From 841a1b071a53ed0ce30600f5f485134be0c7eabc Mon Sep 17 00:00:00 2001 From: Marco Vito Moscaritolo Date: Tue, 17 Oct 2023 15:23:09 +0200 Subject: [PATCH] chore: remove auto as ebpf driver option --- charts/agent/templates/daemonset.yaml | 2 +- charts/agent/tests/universal_ebpf_test.yaml | 30 +++++++++++---------- charts/agent/values.schema.json | 1 - charts/agent/values.yaml | 4 +-- 4 files changed, 19 insertions(+), 18 deletions(-) diff --git a/charts/agent/templates/daemonset.yaml b/charts/agent/templates/daemonset.yaml index da78f4c5c..91eccf6cc 100644 --- a/charts/agent/templates/daemonset.yaml +++ b/charts/agent/templates/daemonset.yaml @@ -190,7 +190,7 @@ spec: {{- if (include "agent.universalEbpfEnforced" .) }} - name: SYSDIG_AGENT_DRIVER value: universal_ebpf - {{- else if (and (include "agent.ebpfEnabled" .) (eq "legacy" .Values.ebpf.kind )) }} + {{- else if (include "agent.legacyEbpfEnforced" .) }} - name: SYSDIG_AGENT_DRIVER value: legacy_ebpf {{- end }} diff --git a/charts/agent/tests/universal_ebpf_test.yaml b/charts/agent/tests/universal_ebpf_test.yaml index 917840a68..b85bba72d 100644 --- a/charts/agent/tests/universal_ebpf_test.yaml +++ b/charts/agent/tests/universal_ebpf_test.yaml @@ -16,26 +16,27 @@ tests: - isNull: path: spec.template.spec.containers[*].env[?(@.name == "SYSDIG_AGENT_DRIVER")] - - it: Ensure that when the eBPF is enabled with the default driver we create the sysdig container with the SYSDIG_BPF_PROBE and without SYSDIG_AGENT_DRIVER environment variables + - it: Ensure that when the eBPF is enabled the default driver is "legacy_ebpf" we create the sysdig container with the SYSDIG_BPF_PROBE and SYSDIG_AGENT_DRIVER=legacy_ebpf environment variables set: ebpf: enabled: true asserts: - isEmpty: path: spec.template.spec.initContainers[*].env[?(@.name == "SYSDIG_BPF_PROBE")].value - - isNull: - path: spec.template.spec.initContainers[*].env[?(@.name == "SYSDIG_AGENT_DRIVER")] + - equal: + path: spec.template.spec.initContainers[*].env[?(@.name == "SYSDIG_AGENT_DRIVER")].value + value: legacy_ebpf - isEmpty: path: spec.template.spec.containers[*].env[?(@.name == "SYSDIG_BPF_PROBE")].value - - isNull: - path: spec.template.spec.containers[*].env[?(@.name == "SYSDIG_AGENT_DRIVER")] + - equal: + path: spec.template.spec.containers[*].env[?(@.name == "SYSDIG_AGENT_DRIVER")].value + value: legacy_ebpf - # TODO: remove before merge - - it: Ensure that when the eBPF is enabled and we specify to use the "legacy" driver we create the sysdig container with the SYSDIG_BPF_PROBE and with SYSDIG_AGENT_DRIVER environment variables + - it: Ensure that when the eBPF is enabled and we specify to use the "legacy_ebpf" driver we create the sysdig container with the SYSDIG_BPF_PROBE and with SYSDIG_AGENT_DRIVER environment variables set: ebpf: enabled: true - kind: legacy + kind: legacy_ebpf asserts: - isEmpty: path: spec.template.spec.initContainers[*].env[?(@.name == "SYSDIG_BPF_PROBE")].value @@ -48,7 +49,8 @@ tests: path: spec.template.spec.containers[*].env[?(@.name == "SYSDIG_AGENT_DRIVER")].value value: legacy_ebpf - - it: Ensure that when the eBPF is enabled and we specify to use the "legacy_ebpf" driver we create the sysdig container with the SYSDIG_BPF_PROBE and with SYSDIG_AGENT_DRIVER environment variables + # TODO: remove before merge + - it: Ensure that when the eBPF is enabled and we specify to use the "legacy" driver we create the sysdig container with the SYSDIG_BPF_PROBE and with SYSDIG_AGENT_DRIVER environment variables set: ebpf: enabled: true @@ -65,12 +67,11 @@ tests: path: spec.template.spec.containers[*].env[?(@.name == "SYSDIG_AGENT_DRIVER")].value value: legacy_ebpf - # TODO: remove before merge - - 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 + - it: Ensure that when the eBPF is enabled and we specify to use the "universal_ebpf" driver we create the sysdig container without the SYSDIG_BPF_PROBE and with the SYSDIG_AGENT_DRIVER environment variables set: ebpf: enabled: true - kind: universal + kind: universal_ebpf asserts: - isNull: path: spec.template.spec.containers[*].env[?(@.name == "SYSDIG_BPF_PROBE")] @@ -78,11 +79,12 @@ tests: path: spec.template.spec.containers[*].env[?(@.name == "SYSDIG_AGENT_DRIVER")].value value: universal_ebpf - - it: Ensure that when the eBPF is enabled and we specify to use the "universal_ebpf" driver we create the sysdig container without the SYSDIG_BPF_PROBE and with the SYSDIG_AGENT_DRIVER environment variables + # TODO: remove before merge + - 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: ebpf: enabled: true - kind: universal_ebpf + kind: universal asserts: - isNull: path: spec.template.spec.containers[*].env[?(@.name == "SYSDIG_BPF_PROBE")] diff --git a/charts/agent/values.schema.json b/charts/agent/values.schema.json index 6543c02fc..6dc5dbdfa 100644 --- a/charts/agent/values.schema.json +++ b/charts/agent/values.schema.json @@ -18,7 +18,6 @@ "kind": { "type": "string", "enum": [ - "auto", "legacy", "universal", "legacy_ebpf", diff --git a/charts/agent/values.yaml b/charts/agent/values.yaml index 96dd0838a..0f8a48362 100644 --- a/charts/agent/values.yaml +++ b/charts/agent/values.yaml @@ -170,8 +170,8 @@ ebpf: # Enable eBPF support for Sysdig Agent enabled: false - # Define the kind of eBPF driver that can be used in the agent. Can be `auto`, `legacy_ebpf` or `universal_ebpf` - kind: auto + # Define the kind of eBPF driver that can be used in the agent. Can be `legacy_ebpf` or `universal_ebpf` + kind: legacy_ebpf slim: # Uses a slim version of the Sysdig Agent