Skip to content

Commit c40b78a

Browse files
committed
add additionalVolumeMounts to chart
Signed-off-by: Nedal Eskaf <nedaleskaif87@gmail.com> use list default for additionalVolumes Signed-off-by: Nedal Eskaf <nedaleskaif87@gmail.com> document additionalVolumes in chart readme Signed-off-by: Nedal Eskaf <nedaleskaif87@gmail.com>
1 parent d4cc9bf commit c40b78a

File tree

3 files changed

+20
-6
lines changed

3 files changed

+20
-6
lines changed

charts/flagger/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,8 @@ The following tables lists the configurable parameters of the Flagger chart and
186186
| `podDisruptionBudget.minAvailable` | The minimal number of available replicas that will be set in the PodDisruptionBudget | `1` |
187187
| `noCrossNamespaceRefs` | If `true`, cross namespace references to custom resources will be disabled | `false` |
188188
| `namespace` | When specified, Flagger will restrict itself to watching Canary objects from that namespace | `""` |
189+
| `additionalVolumes` | Extra volumes to add to the Flagger pod | `[]` |
190+
| `additionalVolumeMounts` | Extra volume mounts to add to the Flagger container | `[]` |
189191
| `deploymentLabels` | Labels to add to Flagger deployment | `{}` |
190192
| `podLabels` | Labels to add to pods of Flagger deployment | `{}` |
191193

charts/flagger/templates/deployment.yaml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,17 @@ spec:
5353
imagePullSecrets:
5454
- name: {{ .Values.image.pullSecret }}
5555
{{- end }}
56-
{{- if .Values.controlplane.kubeconfig.secretName }}
56+
{{- if or .Values.controlplane.kubeconfig.secretName .Values.additionalVolumes }}
5757
volumes:
58+
{{- if .Values.controlplane.kubeconfig.secretName }}
5859
- name: kubeconfig
5960
secret:
6061
secretName: "{{ .Values.controlplane.kubeconfig.secretName }}"
6162
{{- end }}
62-
{{- if .Values.additionalVolumes }}
63-
{{- toYaml .Values.additionalVolumes | nindent 8 -}}
64-
{{- end }}
63+
{{- if .Values.additionalVolumes }}
64+
{{ toYaml .Values.additionalVolumes | nindent 8 }}
65+
{{- end }}
66+
{{- end }}
6567
{{- if .Values.podPriorityClassName }}
6668
priorityClassName: {{ .Values.podPriorityClassName }}
6769
{{- end }}
@@ -71,11 +73,16 @@ spec:
7173
securityContext:
7274
{{ toYaml .Values.securityContext.context | indent 12 }}
7375
{{- end }}
74-
{{- if .Values.controlplane.kubeconfig.secretName }}
76+
{{- if or .Values.controlplane.kubeconfig.secretName .Values.additionalVolumeMounts }}
7577
volumeMounts:
78+
{{- if .Values.controlplane.kubeconfig.secretName }}
7679
- name: kubeconfig
7780
mountPath: "/tmp/controlplane"
7881
{{- end }}
82+
{{- if .Values.additionalVolumeMounts }}
83+
{{ toYaml .Values.additionalVolumeMounts | nindent 12 }}
84+
{{- end }}
85+
{{- end }}
7986
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
8087
imagePullPolicy: {{ .Values.image.pullPolicy }}
8188
ports:

charts/flagger/values.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,11 @@ deploymentLabels: { }
204204
noCrossNamespaceRefs: false
205205

206206
#Placeholder to supply additional volumes to the flagger pod
207-
additionalVolumes: {}
207+
additionalVolumes: []
208208
# - name: tmpfs
209209
# emptyDir: {}
210+
211+
# Placeholder to supply additional volume mounts to the flagger container
212+
additionalVolumeMounts: []
213+
# - name: tmpfs
214+
# mountPath: /tmp

0 commit comments

Comments
 (0)