Fix initContainers spire-server statefulset (#458)
To allow for inplace upgrades of spire-server statefulset we are not allowed to make changes to all fields of the statefulset spec. When bumping from 0.8.1 to the latest version the `initContainers:` field is added in the spec and therefore does not allow for updating the statefulset. This fix prevents the empty initContainers block when bumping from a previous chart version. Signed-off-by: Marco Franssen <[email protected]> Co-authored-by: Faisal Memon <[email protected]>
This commit is contained in:
co-authored by
Faisal Memon
parent
ecb83d6dd4
commit
c298510701
@@ -48,6 +48,7 @@ spec:
|
|||||||
shareProcessNamespace: true
|
shareProcessNamespace: true
|
||||||
securityContext:
|
securityContext:
|
||||||
{{- toYaml .Values.podSecurityContext | nindent 8 }}
|
{{- toYaml .Values.podSecurityContext | nindent 8 }}
|
||||||
|
{{- if or (gt (len .Values.initContainers) 0) (and .Values.upstreamAuthority.certManager.enabled .Values.upstreamAuthority.certManager.ca.create) }}
|
||||||
initContainers:
|
initContainers:
|
||||||
{{- if and .Values.upstreamAuthority.certManager.enabled .Values.upstreamAuthority.certManager.ca.create }}
|
{{- if and .Values.upstreamAuthority.certManager.enabled .Values.upstreamAuthority.certManager.ca.create }}
|
||||||
- name: wait
|
- name: wait
|
||||||
@@ -67,6 +68,7 @@ spec:
|
|||||||
{{- if gt (len .Values.initContainers) 0 }}
|
{{- if gt (len .Values.initContainers) 0 }}
|
||||||
{{- toYaml .Values.initContainers | nindent 8 }}
|
{{- toYaml .Values.initContainers | nindent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
containers:
|
containers:
|
||||||
- name: {{ .Chart.Name }}
|
- name: {{ .Chart.Name }}
|
||||||
securityContext:
|
securityContext:
|
||||||
|
|||||||
Reference in New Issue
Block a user