Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(agent): do not render universal ebpf env vars in gke autopilot #1426

Merged
merged 1 commit into from
Oct 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.1
6 changes: 3 additions & 3 deletions charts/agent/templates/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ spec:
- name: SYSDIG_BPF_PROBE
value:
{{- end }}
{{- if (include "agent.legacyEbpfEnforced" .) }}
{{- if and (include "agent.legacyEbpfEnforced" .) (not (include "agent.gke.autopilot" .)) }}
- name: SYSDIG_AGENT_DRIVER
value: legacy_ebpf
{{- end }}
Expand Down Expand Up @@ -187,10 +187,10 @@ spec:
- name: SYSDIG_BPF_PROBE
value:
{{- end }}
{{- if (include "agent.universalEbpfEnforced" .) }}
{{- if and (include "agent.universalEbpfEnforced" .) (not (include "agent.gke.autopilot" .)) }}
- name: SYSDIG_AGENT_DRIVER
value: universal_ebpf
{{- else if (include "agent.legacyEbpfEnforced" .) }}
{{- else if and (include "agent.legacyEbpfEnforced" .) (not (include "agent.gke.autopilot" .)) }}
- name: SYSDIG_AGENT_DRIVER
value: legacy_ebpf
{{- end }}
Expand Down
11 changes: 11 additions & 0 deletions charts/agent/tests/gke_autopilot_volumes_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -125,3 +125,14 @@ tests:
# We are going to use this "workaround" until we found a proper solution
- isNull:
path: spec.template.spec.volumes[?(@.hostPath.path =~ /\/.*/ && @.hostPath.path != "/run" && @.hostPath.path != "/dev" && @.hostPath.path != "/proc" && @.hostPath.path != "/etc/os-release" && @.hostPath.path != "/boot" && @.hostPath.path != "/var/run/containerd/containerd.sock")]

- it: Ensure the SYSDIG_AGENT_DRIVER env var is not set
set:
gke:
autopilot:
enabled: true
asserts:
- isNull:
path: spec.template.spec.initContainer[0].env[?(@.name != "SYSDIG_BPF_PROBE")]
- isNull:
path: spec.template.spec.containers[0].env[?(@.name != "SYSDIG_BPF_PROBE" && @.name != "K8S_NODE")]
Loading