Check secondary images

This commit is contained in:
Carlos Rodriguez Hernandez
2019-05-28 14:04:12 +00:00
parent f564ac1ded
commit 5327cfa319
10 changed files with 74 additions and 40 deletions

View File

@@ -78,10 +78,4 @@ host. To configure Airflow with the URL of your service:
{{- end }}
{{ include "airflow.validateValues" . }}
{{- if and (contains bitnami/ .Values.image.repository) (not (regexMatch -r\d+$ .Values.image.tag)) }}
WARNING: Rolling tag detected ({{ .Values.image.repository }}:{{ .Values.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 }}
{{ include "airflow.checkRollingTags" . }}

View File

@@ -265,3 +265,23 @@ airflow: airflow.cloneDagFilesFromGit.branch
from git repository (--set airflow.cloneDagFilesFromGit.branch="xxx")
{{- end -}}
{{- end -}}
{{/* Check if there are rolling tags in the images */}}
{{- define "airflow.checkRollingTags" -}}
{{- if and (contains "bitnami/" .Values.image.repository) (not (.Values.image.tag | regexFind "-r\\d+$")) }}
WARNING: Rolling tag detected ({{ .Values.image.repository }}:{{ .Values.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.schedulerImage.repository) (not (.Values.schedulerImage.tag | regexFind "-r\\d+$")) }}
WARNING: Rolling tag detected ({{ .Values.schedulerImage.repository }}:{{ .Values.schedulerImage.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.workerImage.repository) (not (.Values.workerImage.tag | regexFind "-r\\d+$")) }}
WARNING: Rolling tag detected ({{ .Values.workerImage.repository }}:{{ .Values.workerImage.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.git.repository) (not (.Values.git.tag | regexFind "-r\\d+$")) }}
WARNING: Rolling tag detected ({{ .Values.git.repository }}:{{ .Values.git.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 -}}