Check chart controller image tag
This commit is contained in:
parent
130af33510
commit
e9641ba08e
3 changed files with 11 additions and 0 deletions
|
@ -146,3 +146,12 @@ Return the appropriate apiVersion for podSecurityPolicy.
|
|||
{{- print "extensions/v1beta1" -}}
|
||||
{{- 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 -}}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{{- if or (eq .Values.controller.kind "DaemonSet") (eq .Values.controller.kind "Both") -}}
|
||||
{{- include "isControllerTagValid" . -}}
|
||||
apiVersion: {{ template "daemonset.apiVersion" . }}
|
||||
kind: DaemonSet
|
||||
metadata:
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{{- if or (eq .Values.controller.kind "Deployment") (eq .Values.controller.kind "Both") -}}
|
||||
{{- include "isControllerTagValid" . -}}
|
||||
apiVersion: {{ template "deployment.apiVersion" . }}
|
||||
kind: Deployment
|
||||
metadata:
|
||||
|
|
Loading…
Reference in a new issue