Merge pull request #5252 from aledbf/tag

Check chart controller image tag
This commit is contained in:
Kubernetes Prow Robot 2020-03-16 07:58:43 -07:00 committed by GitHub
commit f19d52bba4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 0 deletions

View file

@ -146,3 +146,12 @@ Return the appropriate apiVersion for podSecurityPolicy.
{{- print "extensions/v1beta1" -}} {{- print "extensions/v1beta1" -}}
{{- end -}} {{- end -}}
{{- end -}} {{- end -}}
{{/*
Check the ingress controller version tag is at most three versions behind the last release
*/}}
{{- define "isControllerTagValid" -}}
{{- if not (semverCompare ">=0.27.0" .Values.controller.image.tag) -}}
{{- fail "Controller container image tag should be 0.27.0 or higher" -}}
{{- end -}}
{{- end -}}

View file

@ -1,4 +1,5 @@
{{- if or (eq .Values.controller.kind "DaemonSet") (eq .Values.controller.kind "Both") -}} {{- if or (eq .Values.controller.kind "DaemonSet") (eq .Values.controller.kind "Both") -}}
{{- include "isControllerTagValid" . -}}
apiVersion: {{ template "daemonset.apiVersion" . }} apiVersion: {{ template "daemonset.apiVersion" . }}
kind: DaemonSet kind: DaemonSet
metadata: metadata:

View file

@ -1,4 +1,5 @@
{{- if or (eq .Values.controller.kind "Deployment") (eq .Values.controller.kind "Both") -}} {{- if or (eq .Values.controller.kind "Deployment") (eq .Values.controller.kind "Both") -}}
{{- include "isControllerTagValid" . -}}
apiVersion: {{ template "deployment.apiVersion" . }} apiVersion: {{ template "deployment.apiVersion" . }}
kind: Deployment kind: Deployment
metadata: metadata: