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

@@ -29,15 +29,4 @@
docker run --rm -it bitnami/tensorflow-resnet bash -c "curl -Lo /tmp/cat.jpg https://tensorflow.org/images/blogs/serving/cat.jpg && resnet_client_cc --server_port=$APP_HOST:$APP_PORT --image_file=/tmp/cat.jpg"
{{- if and (contains bitnami/ .Values.server.image.repository) (not (regexMatch -r\d+$ .Values.server.image.tag)) }}
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.client.image.repository) (not (regexMatch -r\d+$ .Values.client.image.tag)) }}
WARNING: Rolling tag detected ({{ .Values.client.image.repository }}:{{ .Values.client.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 "tensorflow-resnet.checkRollingTags" . }}

View File

@@ -124,3 +124,15 @@ imagePullSecrets:
{{- end }}
{{- end -}}
{{- end -}}
{{/* Check if there are rolling tags in the images */}}
{{- define "tensorflow-resnet.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.client.image.repository) (not (.Values.client.image.tag | regexFind "-r\\d+$")) }}
WARNING: Rolling tag detected ({{ .Values.client.image.repository }}:{{ .Values.client.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 -}}