mirror of
https://github.com/kubeshark/kubeshark.git
synced 2025-06-21 22:08:59 +00:00
eBPF capture didn't work in case of persistent storage (#1757)
* cleanup data directory in init container * cleanup data directory in init container --------- Co-authored-by: Alon Girmonsky <1990761+alongir@users.noreply.github.com>
This commit is contained in:
parent
ed0fb34888
commit
f9dd99af1b
@ -25,8 +25,10 @@ spec:
|
|||||||
name: kubeshark-worker-daemon-set
|
name: kubeshark-worker-daemon-set
|
||||||
namespace: kubeshark
|
namespace: kubeshark
|
||||||
spec:
|
spec:
|
||||||
{{- if .Values.tap.mountBpf }}
|
{{- if or .Values.tap.mountBpf .Values.tap.persistentStorage}}
|
||||||
initContainers:
|
initContainers:
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.tap.mountBpf }}
|
||||||
- command:
|
- command:
|
||||||
- /bin/sh
|
- /bin/sh
|
||||||
- -c
|
- -c
|
||||||
@ -45,6 +47,27 @@ spec:
|
|||||||
name: sys
|
name: sys
|
||||||
mountPropagation: Bidirectional
|
mountPropagation: Bidirectional
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- if .Values.tap.persistentStorage }}
|
||||||
|
- command:
|
||||||
|
- /bin/sh
|
||||||
|
- -c
|
||||||
|
- mkdir -p /app/data/$NODE_NAME && rm -rf /app/data/$NODE_NAME/tracer_*
|
||||||
|
{{- if .Values.tap.docker.overrideTag.worker }}
|
||||||
|
image: '{{ .Values.tap.docker.registry }}/worker:{{ .Values.tap.docker.overrideTag.worker }}{{ include "kubeshark.dockerTagDebugVersion" . }}'
|
||||||
|
{{ else }}
|
||||||
|
image: '{{ .Values.tap.docker.registry }}/worker:{{ not (eq .Values.tap.docker.tag "") | ternary .Values.tap.docker.tag (include "kubeshark.defaultVersion" .) }}{{ include "kubeshark.dockerTagDebugVersion" . }}'
|
||||||
|
{{- end }}
|
||||||
|
imagePullPolicy: {{ .Values.tap.docker.imagePullPolicy }}
|
||||||
|
name: cleanup-data-dir
|
||||||
|
env:
|
||||||
|
- name: NODE_NAME
|
||||||
|
valueFrom:
|
||||||
|
fieldRef:
|
||||||
|
fieldPath: spec.nodeName
|
||||||
|
volumeMounts:
|
||||||
|
- mountPath: /app/data
|
||||||
|
name: data
|
||||||
|
{{- end }}
|
||||||
containers:
|
containers:
|
||||||
- command:
|
- command:
|
||||||
- ./worker
|
- ./worker
|
||||||
|
Loading…
Reference in New Issue
Block a user