Skip to content

Commit e7e99a8

Browse files
devodevjoestringer
authored andcommitted
helm: Support extending cilium-agent volume helm templates
Similar to hubble-relay, we want to repackage the cilium chart and mount volumes based on additional helm values and templates. To support adding new volumes, new template blocks ("partial") have been added allowing downstream packagers to simplify modify _extensions.tpl in their fork with the required logic. Signed-off-by: Alexandre Barone <abalexandrebarone@gmail.com>
1 parent 8d5beff commit e7e99a8

2 files changed

Lines changed: 11 additions & 0 deletions

File tree

install/kubernetes/cilium/templates/_extensions.tpl

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,15 @@ _extensions.tpl contains template blocks that are intended to allow packagers
33
to modify or extend the default chart behaviors.
44
*/}}
55

6+
{{/*
7+
Allow packagers to add extra volumes to cilium-agent.
8+
*/}}
9+
{{- define "cilium-agent.volumes.extra" }}
10+
{{- end }}
11+
12+
{{- define "cilium-agent.volumeMounts.extra" }}
13+
{{- end }}
14+
615
{{/*
716
Intentionally empty to allow downstream chart packagers to add extra
817
containers to hubble-relay without having to modify the deployment manifest

install/kubernetes/cilium/templates/cilium-agent/daemonset.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -413,6 +413,7 @@ spec:
413413
{{- with .Values.extraVolumeMounts }}
414414
{{- toYaml . | nindent 8 }}
415415
{{- end }}
416+
{{- include "cilium-agent.volumeMounts.extra" . | nindent 8 }}
416417
{{- if .Values.monitor.enabled }}
417418
- name: cilium-monitor
418419
image: {{ include "cilium.image" .Values.image | quote }}
@@ -1093,4 +1094,5 @@ spec:
10931094
{{- with .Values.extraVolumes }}
10941095
{{- toYaml . | nindent 6 }}
10951096
{{- end }}
1097+
{{- include "cilium-agent.volumes.extra" . | nindent 6 }}
10961098
{{- end }}

0 commit comments

Comments
 (0)