Skip to content

Commit

Permalink
fix(agent): do not render universal ebpf env vars in gke autopilot (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
aroberts87 authored Oct 23, 2023
1 parent aa85ee1 commit e2a9985
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 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.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")]

0 comments on commit e2a9985

Please sign in to comment.