Skip to content

Commit

Permalink
chore: remove auto as ebpf driver option
Browse files Browse the repository at this point in the history
  • Loading branch information
mavimo committed Oct 17, 2023
1 parent cf2276a commit 841a1b0
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 18 deletions.
2 changes: 1 addition & 1 deletion charts/agent/templates/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
30 changes: 16 additions & 14 deletions charts/agent/tests/universal_ebpf_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -65,24 +67,24 @@ 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")]
- equal:
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")]
Expand Down
1 change: 0 additions & 1 deletion charts/agent/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
"kind": {
"type": "string",
"enum": [
"auto",
"legacy",
"universal",
"legacy_ebpf",
Expand Down
4 changes: 2 additions & 2 deletions charts/agent/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 841a1b0

Please sign in to comment.