Skip to content

Commit

Permalink
Make job.ttl.enabled consistent and effective only when k8s >= 1.23 (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
lhotari authored Mar 26, 2024
1 parent bc5862d commit eb0a878
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions charts/pulsar/templates/bookkeeper-cluster-initialize.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ metadata:
spec:
# 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/
{{- if .Values.job.ttl.enabled }}
ttlSecondsAfterFinished: {{ .Values.job.ttl.secondsAfterFinished }}
{{- if and .Values.job.ttl.enabled (semverCompare ">=1.23-0" .Capabilities.KubeVersion.Version) }}
ttlSecondsAfterFinished: {{ .Values.job.ttl.secondsAfterFinished | default 600 }}
{{- end }}
template:
spec:
Expand Down
4 changes: 2 additions & 2 deletions charts/pulsar/templates/pulsar-cluster-initialize.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ metadata:
spec:
# 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/
{{- if .Values.job.ttl.enabled }}
ttlSecondsAfterFinished: {{ .Values.job.ttl.secondsAfterFinished }}
{{- if and .Values.job.ttl.enabled (semverCompare ">=1.23-0" .Capabilities.KubeVersion.Version) }}
ttlSecondsAfterFinished: {{ .Values.job.ttl.secondsAfterFinished | default 600 }}
{{- end }}
template:
spec:
Expand Down

0 comments on commit eb0a878

Please sign in to comment.