Skip to content

Commit 133fdec

Browse files
authored
Merge pull request #1657 from shivamnarula/fix/empty-annotations-and-volumes
Fix removal of empty keys from flagger chart
2 parents 97d1ef0 + 3490d60 commit 133fdec

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

charts/flagger/templates/account.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ kind: ServiceAccount
44
metadata:
55
name: {{ template "flagger.serviceAccountName" . }}
66
namespace: {{ .Release.Namespace }}
7-
annotations:
87
{{- if .Values.serviceAccount.annotations }}
8+
annotations:
99
{{ toYaml .Values.serviceAccount.annotations | indent 4 }}
1010
{{- end }}
1111
labels:

charts/flagger/templates/deployment.yaml

+4-4
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,12 @@ spec:
4848
imagePullSecrets:
4949
- name: {{ .Values.image.pullSecret }}
5050
{{- end }}
51+
{{- if .Values.controlplane.kubeconfig.secretName }}
5152
volumes:
52-
{{- if .Values.controlplane.kubeconfig.secretName }}
5353
- name: kubeconfig
5454
secret:
5555
secretName: "{{ .Values.controlplane.kubeconfig.secretName }}"
56-
{{- end }}
56+
{{- end }}
5757
{{- if .Values.additionalVolumes }}
5858
{{- toYaml .Values.additionalVolumes | nindent 8 -}}
5959
{{- end }}
@@ -66,11 +66,11 @@ spec:
6666
securityContext:
6767
{{ toYaml .Values.securityContext.context | indent 12 }}
6868
{{- end }}
69+
{{- if .Values.controlplane.kubeconfig.secretName }}
6970
volumeMounts:
70-
{{- if .Values.controlplane.kubeconfig.secretName }}
7171
- name: kubeconfig
7272
mountPath: "/tmp/controlplane"
73-
{{- end }}
73+
{{- end }}
7474
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
7575
imagePullPolicy: {{ .Values.image.pullPolicy }}
7676
ports:

0 commit comments

Comments
 (0)