Make job.ttl.enabled consistent and effective only when k8s >= 1.23 (#481)
This commit is contained in:
parent
bc5862d4b0
commit
eb0a878d9c
@ -29,8 +29,8 @@ metadata:
|
|||||||
spec:
|
spec:
|
||||||
# This feature was previously behind a feature gate for several Kubernetes versions and will default to true in 1.23 and beyond
|
# This feature was previously behind a feature gate for several Kubernetes versions and will default to true in 1.23 and beyond
|
||||||
# https://kubernetes.io/docs/reference/command-line-tools-reference/feature-gates/
|
# https://kubernetes.io/docs/reference/command-line-tools-reference/feature-gates/
|
||||||
{{- if .Values.job.ttl.enabled }}
|
{{- if and .Values.job.ttl.enabled (semverCompare ">=1.23-0" .Capabilities.KubeVersion.Version) }}
|
||||||
ttlSecondsAfterFinished: {{ .Values.job.ttl.secondsAfterFinished }}
|
ttlSecondsAfterFinished: {{ .Values.job.ttl.secondsAfterFinished | default 600 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
template:
|
template:
|
||||||
spec:
|
spec:
|
||||||
|
|||||||
@ -30,8 +30,8 @@ metadata:
|
|||||||
spec:
|
spec:
|
||||||
# This feature was previously behind a feature gate for several Kubernetes versions and will default to true in 1.23 and beyond
|
# This feature was previously behind a feature gate for several Kubernetes versions and will default to true in 1.23 and beyond
|
||||||
# https://kubernetes.io/docs/reference/command-line-tools-reference/feature-gates/
|
# https://kubernetes.io/docs/reference/command-line-tools-reference/feature-gates/
|
||||||
{{- if .Values.job.ttl.enabled }}
|
{{- if and .Values.job.ttl.enabled (semverCompare ">=1.23-0" .Capabilities.KubeVersion.Version) }}
|
||||||
ttlSecondsAfterFinished: {{ .Values.job.ttl.secondsAfterFinished }}
|
ttlSecondsAfterFinished: {{ .Values.job.ttl.secondsAfterFinished | default 600 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
template:
|
template:
|
||||||
spec:
|
spec:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user