Skip to content

Commit

Permalink
fix(vector): Allow both extraContainers and extraVolumeMounts (#243)
Browse files Browse the repository at this point in the history
* fix: extraVolumeMounts

* feat(vector): Test combination of extraContainers and extraVolumeMounts in CI

Signed-off-by: Spencer Gilbert <[email protected]>

Signed-off-by: Spencer Gilbert <[email protected]>
Co-authored-by: Spencer Gilbert <[email protected]>
  • Loading branch information
AvihaiSam and spencergilbert authored Sep 28, 2022
1 parent 29f99d7 commit 09a18dd
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 3 deletions.
19 changes: 19 additions & 0 deletions charts/vector/ci/extraContainers-and-extraVolumeMounts-values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Including extraContainers and extraVolumes
## Values file for testing adding extraContainers and extraVolumeMounts to Vector Pods.
extraContainers:
- name: sleep
image: busybox
command: ['sh', '-c', "sleep 5"]
extraVolumes:
- name: podinfo
downwardAPI:
items:
- path: "labels"
fieldRef:
fieldPath: metadata.labels
- path: "annotations"
fieldRef:
fieldPath: metadata.annotations
extraVolumeMounts:
- name: podinfo
mountPath: "/etc/podinfo"
6 changes: 3 additions & 3 deletions charts/vector/templates/_pod.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -145,12 +145,12 @@ containers:
mountPath: "/host/sys"
readOnly: true
{{- end }}
{{- with .Values.extraContainers }}
{{ toYaml . | indent 2 }}
{{- end }}
{{- with .Values.extraVolumeMounts }}
{{- toYaml . | nindent 6 }}
{{- end }}
{{- with .Values.extraContainers }}
{{ toYaml . | indent 2 }}
{{- end }}
terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds }}
{{- with .Values.nodeSelector }}
nodeSelector:
Expand Down

0 comments on commit 09a18dd

Please sign in to comment.