Skip to content

Commit

Permalink
chore: remove support for 'legacy' and 'universal' entry
Browse files Browse the repository at this point in the history
  • Loading branch information
mavimo committed Oct 17, 2023
1 parent e5de499 commit a1b86a2
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 81 deletions.
2 changes: 1 addition & 1 deletion charts/agent/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ sources:
- https://app.sysdigcloud.com/#/settings/user
- https://github.com/draios/sysdig
type: application
version: 1.14.0
version: 1.14.0
4 changes: 2 additions & 2 deletions charts/agent/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -224,13 +224,13 @@ it can act like a boolean
{{- end -}}

{{- define "agent.universalEbpfEnforced" -}}
{{- if (and (eq "true" (include "agent.ebpfEnabled" .)) (or (eq "universal" .Values.ebpf.kind ) (eq "universal_ebpf" .Values.ebpf.kind ))) -}}
{{- if (and (eq "true" (include "agent.ebpfEnabled" .)) (eq "universal_ebpf" .Values.ebpf.kind )) -}}
true
{{- end -}}
{{- end -}}

{{- define "agent.legacyEbpfEnforced" -}}
{{- if (and (eq "true" (include "agent.ebpfEnabled" .)) (or (eq "legacy" .Values.ebpf.kind ) (eq "legacy_ebpf" .Values.ebpf.kind ))) -}}
{{- if (and (eq "true" (include "agent.ebpfEnabled" .)) (eq "legacy_ebpf" .Values.ebpf.kind )) -}}
true
{{- end -}}
{{- end -}}
Expand Down
76 changes: 0 additions & 76 deletions charts/agent/tests/universal_ebpf_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,24 +49,6 @@ 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 "legacy" driver we create the sysdig container with the SYSDIG_BPF_PROBE and with SYSDIG_AGENT_DRIVER environment variables
set:
ebpf:
enabled: true
kind: legacy
asserts:
- isEmpty:
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_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_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
set:
ebpf:
Expand All @@ -79,19 +61,6 @@ tests:
path: spec.template.spec.containers[*].env[?(@.name == "SYSDIG_AGENT_DRIVER")].value
value: universal_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
set:
ebpf:
enabled: true
kind: universal
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 don't create the init container
set:
ebpf:
Expand All @@ -101,16 +70,6 @@ tests:
- isNull:
path: spec.template.spec.initContainers

# TODO: remove before merge
- it: Ensure that when the eBPF is enabled and we specify to use the "universal" driver we don't create the init container
set:
ebpf:
enabled: true
kind: universal
asserts:
- isNull:
path: spec.template.spec.initContainers

- it: Ensure that when the eBPF is enabled and we specify to use the "legacy_ebpf" driver we create the init container
set:
ebpf:
Expand All @@ -121,17 +80,6 @@ tests:
path: spec.template.spec.initContainers[*].image
pattern: quay.io/sysdig/agent-kmodule:.*

# TODO: remove before merge
- it: Ensure that when the eBPF is enabled and we specify to use the "legacy" driver we create the init container
set:
ebpf:
enabled: true
kind: legacy
asserts:
- matchRegex:
path: spec.template.spec.initContainers[*].image
pattern: quay.io/sysdig/agent-kmodule:.*

- it: Ensure that when the eBPF is enabled and we specify to use the "universal_ebpf" driver we use the slim container
set:
ebpf:
Expand All @@ -142,17 +90,6 @@ tests:
path: spec.template.spec.containers[*].image
pattern: quay.io/sysdig/agent-slim:.*

# TODO: remove before merge
- it: Ensure that when the eBPF is enabled and we specify to use the "universal" driver we use the slim container
set:
ebpf:
enabled: true
kind: universal
asserts:
- matchRegex:
path: spec.template.spec.containers[*].image
pattern: quay.io/sysdig/agent-slim:.*

- it: Ensure that when the eBPF is enabled and we specify to use the "universal_ebpf" driver we use the slim container also if is slim container is not enabled
set:
slim:
Expand All @@ -164,16 +101,3 @@ tests:
- matchRegex:
path: spec.template.spec.containers[*].image
pattern: quay.io/sysdig/agent-slim:.*

# TODO: remove before merge
- it: Ensure that when the eBPF is enabled and we specify to use the "universal" driver we use the slim container also if is slim container is not enabled
set:
slim:
enabled: false
ebpf:
enabled: true
kind: universal
asserts:
- matchRegex:
path: spec.template.spec.containers[*].image
pattern: quay.io/sysdig/agent-slim:.*
2 changes: 0 additions & 2 deletions charts/agent/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
"kind": {
"type": "string",
"enum": [
"legacy",
"universal",
"legacy_ebpf",
"universal_ebpf"
]
Expand Down

0 comments on commit a1b86a2

Please sign in to comment.