From d6143f5a6ad6d19d6e98ec901c194b112e1e237e Mon Sep 17 00:00:00 2001 From: "M. Mert Yildiran" Date: Thu, 6 Jun 2024 04:07:24 +0300 Subject: [PATCH] Replace `DisableCgroupIdResolution` field with `ResolutionStrategy` of `MiscConfig` struct --- config/configStructs/tapConfig.go | 2 +- helm-chart/templates/09-worker-daemon-set.yaml | 5 ++--- helm-chart/values.yaml | 2 +- manifests/complete.yaml | 2 ++ 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/config/configStructs/tapConfig.go b/config/configStructs/tapConfig.go index 2f38ae63d..4b3b2e6a6 100644 --- a/config/configStructs/tapConfig.go +++ b/config/configStructs/tapConfig.go @@ -154,7 +154,7 @@ type MiscConfig struct { TrafficSampleRate int `yaml:"trafficSampleRate" json:"trafficSampleRate" default:"100"` TcpStreamChannelTimeoutMs int `yaml:"tcpStreamChannelTimeoutMs" json:"tcpStreamChannelTimeoutMs" default:"10000"` TcpStreamChannelTimeoutShow bool `yaml:"tcpStreamChannelTimeoutShow" json:"tcpStreamChannelTimeoutShow" default:"false"` - DisableCgroupIdResolution bool `yaml:"disableCgroupIdResolution" json:"disableCgroupIdResolution" default:"false"` + ResolutionStrategy string `yaml:"resolutionStrategy" json:"resolutionStrategy" default:"auto"` } type TapConfig struct { diff --git a/helm-chart/templates/09-worker-daemon-set.yaml b/helm-chart/templates/09-worker-daemon-set.yaml index 716bff64a..3db7bf9a6 100644 --- a/helm-chart/templates/09-worker-daemon-set.yaml +++ b/helm-chart/templates/09-worker-daemon-set.yaml @@ -65,9 +65,8 @@ spec: {{- if ne .Values.tap.packetCapture "ebpf" }} - -disable-ebpf {{- end }} - {{- if .Values.tap.misc.disableCgroupIdResolution }} - - -disable-cgroup-id-resolution - {{- end }} + - -resolution-strategy + - '{{ .Values.tap.misc.resolutionStrategy }}' {{- if .Values.tap.debug }} - -debug - -dumptracer diff --git a/helm-chart/values.yaml b/helm-chart/values.yaml index c921976e7..a4c172cda 100644 --- a/helm-chart/values.yaml +++ b/helm-chart/values.yaml @@ -122,7 +122,7 @@ tap: trafficSampleRate: 100 tcpStreamChannelTimeoutMs: 10000 tcpStreamChannelTimeoutShow: false - disableCgroupIdResolution: false + resolutionStrategy: auto logs: file: "" grep: "" diff --git a/manifests/complete.yaml b/manifests/complete.yaml index 64467da60..b0e802813 100644 --- a/manifests/complete.yaml +++ b/manifests/complete.yaml @@ -452,6 +452,8 @@ spec: - -procfs - /hostproc - -disable-ebpf + - -resolution-strategy + - 'auto' image: 'docker.io/kubeshark/worker:v52.3.62' imagePullPolicy: Always name: sniffer