Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
#

{{- if and .Values.initialize .Values.auth.authentication.enabled .Values.auth.authentication.jwt.enabled .Values.auth.authentication.jwt.autoInitSecret }}
{{- $jobAnnotations := mergeOverwrite (deepCopy (.Values.toolset.annotations | default dict)) (.Values.toolset.initJobAnnotations | default dict) }}
{{- $podAnnotations := mergeOverwrite (deepCopy (.Values.toolset.podAnnotations | default dict)) (.Values.toolset.initJobAnnotations | default dict) }}
Comment thread
tuteng marked this conversation as resolved.
Outdated
apiVersion: batch/v1
kind: Job
metadata:
Expand All @@ -13,9 +15,9 @@ metadata:
{{- with .Values.toolset.labels }}
{{ toYaml . | indent 4 }}
{{- end }}
{{- if $jobAnnotations }}
annotations:
{{- with .Values.toolset.annotations }}
{{ toYaml . | indent 4 }}
{{ toYaml $jobAnnotations | indent 4 }}
{{- end }}
spec:
template:
Expand All @@ -25,9 +27,9 @@ spec:
{{- if .Values.toolset.labels }}
{{ toYaml .Values.toolset.labels | indent 8 }}
{{- end }}
{{- if $podAnnotations }}
annotations:
{{- if .Values.toolset.annotations }}
{{ toYaml .Values.toolset.annotations | indent 8 }}
{{ toYaml $podAnnotations | indent 8 }}
{{- end }}
spec:
{{- if .Values.global.imagePullSecrets }}
Expand Down
1 change: 1 addition & 0 deletions charts/sn-platform-slim/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1853,6 +1853,7 @@ toolset:
annotations: {}
podLabels: {}
podAnnotations: {}
initJobAnnotations: {}
tolerations: []
gracePeriod: 0
resources:
Expand Down
12 changes: 7 additions & 5 deletions charts/sn-platform/templates/toolset/jwt-secret-init-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
#

{{- if and .Values.initialize .Values.auth.authentication.enabled .Values.auth.authentication.jwt.enabled .Values.auth.authentication.jwt.autoInitSecret }}
{{- $jobAnnotations := mergeOverwrite (deepCopy (.Values.toolset.annotations | default dict)) (.Values.toolset.initJobAnnotations | default dict) }}
{{- $podAnnotations := mergeOverwrite (deepCopy (.Values.toolset.podAnnotations | default dict)) (.Values.toolset.initJobAnnotations | default dict) }}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve toolset.annotations on init-job pod

This change builds $podAnnotations from toolset.podAnnotations plus initJobAnnotations, but the previous template applied toolset.annotations to the init job pod. As a result, existing installs that only configured toolset.annotations (for example, admission-controller or service-mesh pod annotations) will silently stop applying those annotations to jwt-secret-init pods after upgrade, which is a behavior regression. Consider preserving legacy inheritance (e.g., include toolset.annotations in the pod merge, or add a fallback) to keep existing values files working.

Useful? React with 👍 / 👎.

Comment thread
tuteng marked this conversation as resolved.
Outdated
apiVersion: batch/v1
kind: Job
metadata:
Expand All @@ -13,9 +15,9 @@ metadata:
{{- with .Values.toolset.labels }}
{{ toYaml . | indent 4 }}
{{- end }}
{{- if $jobAnnotations }}
annotations:
{{- with .Values.toolset.annotations }}
{{ toYaml . | indent 4 }}
{{ toYaml $jobAnnotations | indent 4 }}
{{- end }}
spec:
template:
Expand All @@ -25,9 +27,9 @@ spec:
{{- if .Values.toolset.labels }}
{{ toYaml .Values.toolset.labels | indent 8 }}
{{- end }}
{{- if $podAnnotations }}
annotations:
{{- if .Values.toolset.annotations }}
{{ toYaml .Values.toolset.annotations | indent 8 }}
{{ toYaml $podAnnotations | indent 8 }}
{{- end }}
spec:
{{- if .Values.global.imagePullSecrets }}
Expand Down Expand Up @@ -92,4 +94,4 @@ spec:
- name: tmp
mountPath: /tmp/binaries
restartPolicy: Never
{{- end }}
{{- end }}
1 change: 1 addition & 0 deletions charts/sn-platform/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1931,6 +1931,7 @@ toolset:
annotations: {}
podLabels: {}
podAnnotations: {}
initJobAnnotations: {}
Comment thread
tuteng marked this conversation as resolved.
tolerations: []
kafka:
enabled: false
Expand Down
Loading