-
Notifications
You must be signed in to change notification settings - Fork 127
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature(agent): add support for Universal eBPF - CA (#1270)
Co-authored-by: Adam Roberts <[email protected]>
- Loading branch information
1 parent
3329a0d
commit fd27a06
Showing
8 changed files
with
173 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
suite: Universal eBPF tests | ||
templates: | ||
- templates/daemonset.yaml | ||
tests: | ||
- it: Ensure that when the eBPF is disabled we create the sysdig container without SYSDIG_BPF_PROBE and SYSDIG_AGENT_DRIVER environment variables | ||
set: | ||
ebpf: | ||
enabled: false | ||
asserts: | ||
- isNull: | ||
path: spec.template.spec.initContainers[*].env[?(@.name == "SYSDIG_BPF_PROBE")] | ||
- isNull: | ||
path: spec.template.spec.initContainers[*].env[?(@.name == "SYSDIG_AGENT_DRIVER")] | ||
- isNull: | ||
path: spec.template.spec.containers[*].env[?(@.name == "SYSDIG_BPF_PROBE")] | ||
- isNull: | ||
path: spec.template.spec.containers[*].env[?(@.name == "SYSDIG_AGENT_DRIVER")] | ||
|
||
- 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 | ||
- 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 "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_ebpf | ||
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: | ||
enabled: true | ||
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 don't create the init container | ||
set: | ||
ebpf: | ||
enabled: true | ||
kind: universal_ebpf | ||
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: | ||
enabled: true | ||
kind: legacy_ebpf | ||
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: | ||
enabled: true | ||
kind: universal_ebpf | ||
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: | ||
enabled: false | ||
ebpf: | ||
enabled: true | ||
kind: universal_ebpf | ||
asserts: | ||
- matchRegex: | ||
path: spec.template.spec.containers[*].image | ||
pattern: quay.io/sysdig/agent-slim:.* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
"$schema": "http://json-schema.org/schema#", | ||
"type": "object", | ||
"required": [ | ||
"ebpf" | ||
], | ||
"properties": { | ||
"ebpf": { | ||
"type": "object", | ||
"required": [ | ||
"enabled", | ||
"kind" | ||
], | ||
"properties": { | ||
"enabled": { | ||
"type": "boolean" | ||
}, | ||
"kind": { | ||
"type": "string", | ||
"enum": [ | ||
"legacy_ebpf", | ||
"universal_ebpf" | ||
] | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ apiVersion: v2 | |
name: sysdig-deploy | ||
description: A chart with various Sysdig components for Kubernetes | ||
type: application | ||
version: 1.24.7 | ||
version: 1.25.0 | ||
maintainers: | ||
- name: AlbertoBarba | ||
email: [email protected] | ||
|
@@ -26,7 +26,7 @@ dependencies: | |
- name: agent | ||
# repository: https://charts.sysdig.com | ||
repository: file://../agent | ||
version: ~1.13.15 | ||
version: ~1.14.0 | ||
alias: agent | ||
condition: agent.enabled | ||
- name: common | ||
|