Skip to content

Commit e2a9985

Browse files
authored
fix(agent): do not render universal ebpf env vars in gke autopilot (#1426)
1 parent aa85ee1 commit e2a9985

File tree

3 files changed

+15
-4
lines changed

3 files changed

+15
-4
lines changed

charts/agent/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@ sources:
3030
- https://app.sysdigcloud.com/#/settings/user
3131
- https://github.com/draios/sysdig
3232
type: application
33-
version: 1.14.0
33+
version: 1.14.1

charts/agent/templates/daemonset.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ spec:
9696
- name: SYSDIG_BPF_PROBE
9797
value:
9898
{{- end }}
99-
{{- if (include "agent.legacyEbpfEnforced" .) }}
99+
{{- if and (include "agent.legacyEbpfEnforced" .) (not (include "agent.gke.autopilot" .)) }}
100100
- name: SYSDIG_AGENT_DRIVER
101101
value: legacy_ebpf
102102
{{- end }}
@@ -187,10 +187,10 @@ spec:
187187
- name: SYSDIG_BPF_PROBE
188188
value:
189189
{{- end }}
190-
{{- if (include "agent.universalEbpfEnforced" .) }}
190+
{{- if and (include "agent.universalEbpfEnforced" .) (not (include "agent.gke.autopilot" .)) }}
191191
- name: SYSDIG_AGENT_DRIVER
192192
value: universal_ebpf
193-
{{- else if (include "agent.legacyEbpfEnforced" .) }}
193+
{{- else if and (include "agent.legacyEbpfEnforced" .) (not (include "agent.gke.autopilot" .)) }}
194194
- name: SYSDIG_AGENT_DRIVER
195195
value: legacy_ebpf
196196
{{- end }}

charts/agent/tests/gke_autopilot_volumes_test.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,3 +125,14 @@ tests:
125125
# We are going to use this "workaround" until we found a proper solution
126126
- isNull:
127127
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")]
128+
129+
- it: Ensure the SYSDIG_AGENT_DRIVER env var is not set
130+
set:
131+
gke:
132+
autopilot:
133+
enabled: true
134+
asserts:
135+
- isNull:
136+
path: spec.template.spec.initContainer[0].env[?(@.name != "SYSDIG_BPF_PROBE")]
137+
- isNull:
138+
path: spec.template.spec.containers[0].env[?(@.name != "SYSDIG_BPF_PROBE" && @.name != "K8S_NODE")]

0 commit comments

Comments
 (0)