Skip to content

Commit

Permalink
fix(hubble-chart): volumeMount handling
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Castilio dos Santos <[email protected]>
  • Loading branch information
alexcastilio committed Mar 4, 2025
1 parent 06d3177 commit 888b004
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 26 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{{- if .Values.agent.enabled -}}
{{- if .Values.os.linux -}}

apiVersion: apps/v1
kind: DaemonSet
metadata:
Expand Down Expand Up @@ -49,9 +50,8 @@ spec:
- name: bpf
mountPath: /sys/fs/bpf
mountPropagation: Bidirectional
- name: varrun
- name: cilium
mountPath: /var/run/cilium
mountPropagation: Bidirectional
- name: config
mountPath: /retina/config
containers:
Expand Down Expand Up @@ -109,9 +109,9 @@ spec:
privileged: {{ .Values.securityContext.privileged }}
{{- if .Values.volumeMounts }}
volumeMounts:
{{- range $name, $mountPath := .Values.volumeMounts }}
{{- range $name, $mount := .Values.volumeMounts}}
- name: {{ $name }}
mountPath: {{ $mountPath }}
mountPath: {{ $mount.mountPath }}
{{- end }}
{{- if .Values.hubble.tls.enabled }}
- name: tls
Expand All @@ -121,21 +121,9 @@ spec:
{{- end }}
terminationGracePeriodSeconds: 90 # Allow for retina to cleanup plugin resources.
volumes:
{{- range $name, $hostPath := .Values.volumeMounts}}
{{- range $name, $mount := .Values.volumeMounts}}
- name: {{ $name }}
{{ if eq $name "config" }}
configMap:
name: {{ $.Values.nameOverride }}-config
{{ else if eq $name "tmp"}}
emptyDir: {}
{{ else if eq $name "varrun"}}
hostPath:
path: {{ $hostPath }}
type: DirectoryOrCreate
{{ else }}
hostPath:
path: {{ $hostPath }}
{{ end }}
{{ $mount.volume | toYaml | nindent 8 }}
{{- end }}
{{- if .Values.hubble.tls.enabled }}
- name: tls
Expand Down
44 changes: 36 additions & 8 deletions deploy/hubble/manifests/controller/helm/retina/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -99,15 +99,43 @@ azure:
appinsights:
instrumentation_key: "app-insights-instrumentation-key"

# volume mounts with name and mountPath
# volume mounts with name, mountPath and volume details
volumeMounts:
debug: /sys/kernel/debug
trace: /sys/kernel/tracing
bpf: /sys/fs/bpf
cgroup: /sys/fs/cgroup
tmp: /tmp
config: /retina/config
varrun: /var/run/cilium
bpf:
mountPath: /sys/fs/bpf
volume:
hostPath:
path: /sys/fs/bpf
cgroup:
mountPath: /sys/fs/cgroup
volume:
hostPath:
path: /sys/fs/cgroup
config:
mountPath: /retina/config
volume:
configMap:
name: retina-config
debug:
mountPath: /sys/kernel/debug
volume:
hostPath:
path: /sys/kernel/debug
tmp:
mountPath: /tmp
volume:
emptyDir: {}
trace:
mountPath: /sys/kernel/tracing
volume:
hostPath:
path: /sys/kernel/tracing
cilium:
mountPath: /var/run/cilium
volume:
hostPath:
path: /var/run/cilium
type: DirectoryOrCreate

#volume mounts for indows
volumeMounts_win:
Expand Down

0 comments on commit 888b004

Please sign in to comment.