Skip to content

Commit 6ff5a2f

Browse files
MrFreezeexgiorio94
authored andcommitted
helm: misc small cleanups with cert gen job spec
This commit removes serviceAccount that was deprecated for 10+ versions (see https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#podspec-v1-core). And we also fix affinity key that was always added even when no affinity was specified. Signed-off-by: Arthur Outhenin-Chalandre <arthur@cri.epita.fr>
1 parent da223d9 commit 6ff5a2f

2 files changed

Lines changed: 2 additions & 4 deletions

File tree

install/kubernetes/cilium/templates/clustermesh-apiserver/tls-cronjob/_job-spec.tpl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,6 @@ spec:
9696
tolerations:
9797
{{- toYaml . | nindent 8 }}
9898
{{- end }}
99-
serviceAccount: {{ .Values.serviceAccounts.clustermeshcertgen.name | quote }}
10099
serviceAccountName: {{ .Values.serviceAccounts.clustermeshcertgen.name | quote }}
101100
automountServiceAccountToken: {{ .Values.serviceAccounts.clustermeshcertgen.automount }}
102101
{{- with .Values.imagePullSecrets }}
@@ -108,8 +107,8 @@ spec:
108107
volumes:
109108
{{- toYaml . | nindent 6 }}
110109
{{- end }}
111-
affinity:
112110
{{- with .Values.certgen.affinity }}
111+
affinity:
113112
{{- toYaml . | nindent 8 }}
114113
{{- end }}
115114
ttlSecondsAfterFinished: {{ .Values.certgen.ttlSecondsAfterFinished }}

install/kubernetes/cilium/templates/hubble/tls-cronjob/_job-spec.tpl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,6 @@ spec:
137137
tolerations:
138138
{{- toYaml . | nindent 8 }}
139139
{{- end }}
140-
serviceAccount: {{ .Values.serviceAccounts.hubblecertgen.name | quote }}
141140
serviceAccountName: {{ .Values.serviceAccounts.hubblecertgen.name | quote }}
142141
automountServiceAccountToken: {{ .Values.serviceAccounts.hubblecertgen.automount }}
143142
{{- with .Values.imagePullSecrets }}
@@ -149,8 +148,8 @@ spec:
149148
volumes:
150149
{{- toYaml . | nindent 6 }}
151150
{{- end }}
152-
affinity:
153151
{{- with .Values.certgen.affinity }}
152+
affinity:
154153
{{- toYaml . | nindent 8 }}
155154
{{- end }}
156155
ttlSecondsAfterFinished: {{ .Values.certgen.ttlSecondsAfterFinished }}

0 commit comments

Comments
 (0)