From 2b30d43b6dc0ba26a18cdc7a41a232dc1a2feb36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Rodr=C3=ADguez=20Hern=C3=A1ndez?= Date: Tue, 28 May 2019 20:49:12 +0200 Subject: [PATCH] [stable/parse] Use immutable tags (#14201) * Bump chart version Signed-off-by: Carlos Rodriguez Hernandez * [stable/parse] Use immutable tags Signed-off-by: Carlos Rodriguez Hernandez * Fix typo Signed-off-by: Carlos Rodriguez Hernandez --- stable/parse/Chart.yaml | 2 +- stable/parse/README.md | 10 ++++++++-- stable/parse/templates/NOTES.txt | 2 ++ stable/parse/templates/_helpers.tpl | 12 ++++++++++++ stable/parse/values.yaml | 2 +- 5 files changed, 24 insertions(+), 4 deletions(-) diff --git a/stable/parse/Chart.yaml b/stable/parse/Chart.yaml index feb7501e30..b561ef6539 100644 --- a/stable/parse/Chart.yaml +++ b/stable/parse/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 name: parse -version: 6.2.5 +version: 6.2.6 appVersion: 3.4.0 description: Parse is a platform that enables users to add a scalable and powerful backend to launch a full-featured app for iOS, Android, JavaScript, Windows, Unity, and more. keywords: diff --git a/stable/parse/README.md b/stable/parse/README.md index 1a4b3377ff..feeb5cb407 100644 --- a/stable/parse/README.md +++ b/stable/parse/README.md @@ -56,7 +56,7 @@ The following table lists the configurable parameters of the Parse chart and the | `service.nodePorts.http` | Kubernetes http node port | `""` | | `server.image.registry` | Parse image registry | `docker.io` | | `server.image.repository` | Parse image name | `bitnami/parse` | -| `server.image.tag` | Parse image tag | `{VERSION}` | +| `server.image.tag` | Parse image tag | `{TAG_NAME}` | | `server.image.pullPolicy` | Image pull policy | `Always` if `imageTag` is `latest`, else `IfNotPresent` | | `server.image.pullSecrets` | Specify docker-registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) | | `server.securityContext.enabled` | Enable security context for Parse Server | `true` | @@ -70,7 +70,7 @@ The following table lists the configurable parameters of the Parse chart and the | `dashboard.enabled` | Enable parse dashboard | `true` | | `dashboard.image.registry` | Dashboard image registry | `docker.io` | | `dashboard.image.repository` | Dashboard image name | `bitnami/parse-dashboard` | -| `dashboard.image.tag` | Dashboard image tag | `{VERSION}` | +| `dashboard.image.tag` | Dashboard image tag | `{TAG_NAME}` | | `dashboard.image.pullPolicy` | Image pull policy | `Always` if `imageTag` is `latest`, else `IfNotPresent` | | `dashboard.securityContext.enabled` | Enable security context for Dashboard | `true` | | `dashboard.securityContext.fsGroup` | Group ID for Dashboard container | `1001` | @@ -141,6 +141,12 @@ $ helm install --name my-release -f values.yaml stable/parse > **Tip**: You can use the default [values.yaml](values.yaml) +### [Rolling VS Immutable tags](https://docs.bitnami.com/containers/how-to/understand-rolling-tags-containers/) + +It is strongly recommended to use immutable tags in a production environment. This ensures your deployment does not change automatically if the same tag is updated with a different image. + +Bitnami will release a new chart updating its containers if a new version of the main container, significant changes, or critical vulnerabilities exist. + ## Persistence The [Bitnami Parse](https://github.com/bitnami/bitnami-docker-parse) image stores the Parse data and configurations at the `/bitnami/parse` path of the container. diff --git a/stable/parse/templates/NOTES.txt b/stable/parse/templates/NOTES.txt index d448136ecd..bce5a6152c 100644 --- a/stable/parse/templates/NOTES.txt +++ b/stable/parse/templates/NOTES.txt @@ -83,3 +83,5 @@ service: echo Password: $(kubectl get secret --namespace {{ .Release.Namespace }} {{ template "parse.fullname" . }} -o jsonpath="{.data.parse-dashboard-password}" | base64 --decode) {{- end }} {{- end }} + +{{ include "parse.checkRollingTags" . }} diff --git a/stable/parse/templates/_helpers.tpl b/stable/parse/templates/_helpers.tpl index ef3f175a91..8e2d8e2a64 100644 --- a/stable/parse/templates/_helpers.tpl +++ b/stable/parse/templates/_helpers.tpl @@ -131,3 +131,15 @@ imagePullSecrets: {{- end }} {{- end -}} {{- end -}} + +{{/* Check if there are rolling tags in the images */}} +{{- define "parse.checkRollingTags" -}} +{{- if and (contains "bitnami/" .Values.server.image.repository) (not (.Values.server.image.tag | regexFind "-r\\d+$")) }} +WARNING: Rolling tag detected ({{ .Values.server.image.repository }}:{{ .Values.server.image.tag }}), please note that it is strongly recommended to avoid using rolling tags in a production environment. ++info https://docs.bitnami.com/containers/how-to/understand-rolling-tags-containers/ +{{- end }} +{{- if and (contains "bitnami/" .Values.dashboard.image.repository) (not (.Values.dashboard.image.tag | regexFind "-r\\d+$")) }} +WARNING: Rolling tag detected ({{ .Values.dashboard.image.repository }}:{{ .Values.dashboard.image.tag }}), please note that it is strongly recommended to avoid using rolling tags in a production environment. ++info https://docs.bitnami.com/containers/how-to/understand-rolling-tags-containers/ +{{- end }} +{{- end -}} diff --git a/stable/parse/values.yaml b/stable/parse/values.yaml index d6315ed91e..d74215783d 100644 --- a/stable/parse/values.yaml +++ b/stable/parse/values.yaml @@ -96,7 +96,7 @@ dashboard: image: registry: docker.io repository: bitnami/parse-dashboard - tag: 1.2.0 + tag: 1.3.0-debian-9-r28 ## Specify a imagePullPolicy ## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent' ## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images