From b7546be03af693fbafa46d23b9fafb68b217c4d9 Mon Sep 17 00:00:00 2001 From: Marco Vito Moscaritolo Date: Tue, 3 Oct 2023 23:21:09 +0200 Subject: [PATCH] feature(agent): standardize the value used for driver selection (#1389) --- charts/agent/templates/daemonset.yaml | 6 +++--- charts/agent/tests/universal_ebpf_test.yaml | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/charts/agent/templates/daemonset.yaml b/charts/agent/templates/daemonset.yaml index fbb252bf8..da78f4c5c 100644 --- a/charts/agent/templates/daemonset.yaml +++ b/charts/agent/templates/daemonset.yaml @@ -98,7 +98,7 @@ spec: {{- end }} {{- if (include "agent.legacyEbpfEnforced" .) }} - name: SYSDIG_AGENT_DRIVER - value: legacy_bpf + value: legacy_ebpf {{- end }} {{- range $key, $value := .Values.daemonset.kmodule.env }} - name: {{ $key | quote }} @@ -189,10 +189,10 @@ spec: {{- end }} {{- if (include "agent.universalEbpfEnforced" .) }} - name: SYSDIG_AGENT_DRIVER - value: universal_bpf + value: universal_ebpf {{- else if (and (include "agent.ebpfEnabled" .) (eq "legacy" .Values.ebpf.kind )) }} - name: SYSDIG_AGENT_DRIVER - value: legacy_bpf + value: legacy_ebpf {{- end }} {{- if (.Values.proxy.httpProxy | default .Values.global.proxy.httpProxy) }} - name: http_proxy diff --git a/charts/agent/tests/universal_ebpf_test.yaml b/charts/agent/tests/universal_ebpf_test.yaml index db672d383..1d003bf0a 100644 --- a/charts/agent/tests/universal_ebpf_test.yaml +++ b/charts/agent/tests/universal_ebpf_test.yaml @@ -40,12 +40,12 @@ tests: path: spec.template.spec.initContainers[*].env[?(@.name == "SYSDIG_BPF_PROBE")].value - equal: path: spec.template.spec.initContainers[*].env[?(@.name == "SYSDIG_AGENT_DRIVER")].value - value: legacy_bpf + value: legacy_ebpf - isEmpty: path: spec.template.spec.containers[*].env[?(@.name == "SYSDIG_BPF_PROBE")].value - equal: path: spec.template.spec.containers[*].env[?(@.name == "SYSDIG_AGENT_DRIVER")].value - value: legacy_bpf + value: legacy_ebpf - it: Ensure that when the eBPF is enabled and we specify to use the "universal" driver we create the sysdig container without the SYSDIG_BPF_PROBE and with the SYSDIG_AGENT_DRIVER environment variables set: @@ -57,7 +57,7 @@ tests: path: spec.template.spec.containers[*].env[?(@.name == "SYSDIG_BPF_PROBE")] - equal: path: spec.template.spec.containers[*].env[?(@.name == "SYSDIG_AGENT_DRIVER")].value - value: universal_bpf + value: universal_ebpf - it: Ensure that when the eBPF is enabled and we specify to use the "universal" driver we don't create the init container set: