Skip to content

Commit

Permalink
feature(agent): standardize the value used for driver selection (#1389)
Browse files Browse the repository at this point in the history
  • Loading branch information
mavimo committed Oct 5, 2023
1 parent 1d1be09 commit 5b080e0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions charts/agent/templates/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions charts/agent/tests/universal_ebpf_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand Down

0 comments on commit 5b080e0

Please sign in to comment.