Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 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/shield/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ maintainers:
- name: mavimo
email: marcovito.moscaritolo@sysdig.com
type: application
version: 1.0.0
version: 1.1.0
appVersion: "1.0.0"
6 changes: 3 additions & 3 deletions charts/shield/templates/host/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -83,21 +83,21 @@ If release name contains chart name it will be used as a full name.
{{- end }}

{{- define "host.driver.is_ebpf" }}
{{- if or (include "host.driver.is_legacy_ebpf" .) (include "host.driver.is_universal_ebpf" .) }}
{{- if or (include "host.driver.is_legacy_ebpf" .) (include "common.cluster_type.is_gke_autopilot" .) }}
Comment thread
francesco-furlan marked this conversation as resolved.
Outdated
true
{{- else }}
{{- end }}
{{- end }}

{{- define "host.driver.is_legacy_ebpf" }}
{{- if eq "legacy_ebpf" .Values.host.driver }}
{{- if and (eq "legacy_ebpf" .Values.host.driver) (not (include "common.cluster_type.is_gke_autopilot" .)) }}
true
{{- else }}
{{- end }}
{{- end }}

{{- define "host.driver.is_universal_ebpf" }}
{{- if eq "universal_ebpf" .Values.host.driver }}
{{- if or (eq "universal_ebpf" .Values.host.driver) (include "common.cluster_type.is_gke_autopilot" .) }}
true
{{- else }}
{{- end }}
Expand Down
8 changes: 1 addition & 7 deletions charts/shield/templates/host/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,6 @@ spec:
- mountPath: /host/etc/os-release
name: osrel
readOnly: true
- mountPath: /root/.sysdig
name: bpf-probes
{{- end }}
{{- end }}
containers:
Expand All @@ -123,7 +121,7 @@ spec:
- name: SYSDIG_BPF_PROBE
value:
{{- end }}
{{- if and (include "host.driver.is_universal_ebpf" .) (not (include "common.cluster_type.is_gke_autopilot" .)) }}
{{- if (include "host.driver.is_universal_ebpf" .) }}
- name: SYSDIG_AGENT_DRIVER
value: universal_ebpf
{{- else if and (include "host.driver.is_legacy_ebpf" .) (not (include "common.cluster_type.is_gke_autopilot" .)) }}
Expand Down Expand Up @@ -214,8 +212,6 @@ spec:
readOnly: true
- mountPath: /host/var/run/containerd/containerd.sock
name: containerdsock-vol
- mountPath: /root/.sysdig
name: bpf-probes
{{- end }}

{{- if (include "host.need_host_root" .) }}
Expand Down Expand Up @@ -313,8 +309,6 @@ spec:
- name: osrel
hostPath:
path: /etc/os-release
- name: bpf-probes
emptyDir: {}
- name: containerdsock-vol
hostPath:
path: /var/run/containerd/containerd.sock
Expand Down
14 changes: 14 additions & 0 deletions charts/shield/templates/host/gke-allowlist-synchronizer.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{{- if (include "common.cluster_type.is_gke_autopilot" .) -}}
apiVersion: auto.gke.io/v1
kind: AllowlistSynchronizer
metadata:
name: sysdig-agent-allowlist-synchronizer
namespace: {{ .Release.Namespace }}
annotations:
helm.sh/hook: "pre-install,pre-upgrade"
labels:
{{- include "host.labels" . | nindent 4 }}
spec:
allowlistPaths:
- "Sysdig/agent/*"
{{- end -}}
25 changes: 25 additions & 0 deletions charts/shield/tests/host/gke-allowlist-synchronizer_test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
suite: Host - Service
templates:
- templates/host/gke-allowlist-synchronizer.yaml
release:
name: release-name
namespace: shield-namespace
values:
- ../values/gke-autopilot.yaml
tests:
- it: Contains the agent GKE AllowlistSynchronizer resource
asserts:
- containsDocument:
kind: AllowlistSynchronizer
apiVersion: auto.gke.io/v1
name: sysdig-agent-allowlist-synchronizer
- equal:
path: metadata.namespace
value: shield-namespace
- equal:
path: metadata.annotations["helm.sh/hook"]
value: pre-install,pre-upgrade
- equal:
path: spec.allowlistPaths
value:
- "Sysdig/agent/*"
11 changes: 11 additions & 0 deletions charts/shield/tests/values/gke-autopilot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
cluster_config:
name: test-cluster
cluster_type: gke-autopilot

sysdig_endpoint:
region: custom
access_key: 12345678-1234-1234-1234-123456789012
api_url: https://www.example.com
collector:
host: example.com
port: 6443
Loading