Skip to content

Commit a4c33cc

Browse files
committed
add autopilot support
1 parent e20766e commit a4c33cc

File tree

4 files changed

+28
-1
lines changed

4 files changed

+28
-1
lines changed

charts/cortex-agent/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ Even when using `--reuse-values` (which uses the values of the previous installa
9797
| `platform.talos` | Support for TalOS platform (Required when installing on TalOS) | Since 1.5.0, agent >= 8.2
9898
| `platform.gcos` | Support for GCOS (Google Container-Optimized OS) platform (Required when installing on GCOS) | Since 1.5.0, agent >= 8.2
9999
| `platform.bottlerocket` | Support for BottlerocketOS platform (Required when installing on BottlerocketOS) | Since 1.6.3, agent >= 8.3
100+
| `platform.autopilot` | Support for Autopilot platform (Required when installing on GKE Autopilot cluster) | Since 1.8.0, agent >= 8.9
100101
| `agent.clusterName` | Name of the kuberenets cluster, will be used as part of the information sent to the server | Since 1.5.0, agent >= 8.2
101102
| `namespace.name` | Name of the namespace the agent resides on | Since 1.6.0
102103
| `namespace.create` | Create/Don't create namespace for the agent | Since 1.6.0
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{{- if .Values.platform.autopilot }}
2+
apiVersion: auto.gke.io/v1
3+
kind: AllowlistSynchronizer
4+
metadata:
5+
name: cortex-xdr-synchronizer
6+
annotations:
7+
helm.sh/hook: "pre-install,pre-upgrade"
8+
"helm.sh/hook-weight": "-1"
9+
spec:
10+
allowlistPaths:
11+
- Palo-Alto-Networks/cortex-agent/*
12+
{{- end }}

charts/cortex-agent/templates/daemonset.yaml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,12 @@ spec:
4949

5050
containers:
5151
- name: cortex-agent
52+
{{- if .Values.platform.autopilot }}
53+
image: {{ .Values.daemonset.image.url }}
54+
{{- else }}
5255
image: {{ .Values.daemonset.image.repository }}:{{ .Values.daemonset.image.tag }}
56+
{{- end }}
57+
5358
imagePullPolicy: {{ .Values.daemonset.image.pullPolicy }}
5459

5560
securityContext:
@@ -71,7 +76,7 @@ spec:
7176
- SYS_ADMIN
7277
- SYSLOG
7378
- SYS_CHROOT
74-
{{- if not .Values.platform.talos }}
79+
{{- if not (or .Values.platform.talos .Values.platform.autopilot) }}
7580
- SYS_MODULE
7681
{{- end }}
7782
- SYS_PTRACE
@@ -116,8 +121,10 @@ spec:
116121
- name: var-log
117122
mountPath: /var/log
118123

124+
{{- if not .Values.platform.autopilot }}
119125
- name: host-km-directory
120126
mountPath: /lib/modules
127+
{{- end }}
121128

122129
- name: pod-info
123130
mountPath: /var/run/pod-info
@@ -150,10 +157,12 @@ spec:
150157
path: {{ include "cortex-xdr.XdrVarLogHostPath" . | quote }}
151158
type: DirectoryOrCreate
152159

160+
{{- if not .Values.platform.autopilot }}
153161
- name: host-km-directory
154162
hostPath:
155163
path: /lib/modules
156164
type: Directory
165+
{{- end }}
157166

158167
- name: pod-info
159168
downwardAPI:

charts/cortex-agent/values.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ platform:
3434
gcos: false
3535
# Deploy on bottlerocket platform
3636
bottlerocket: false
37+
# Deploy on autopilot cluster
38+
autopilot: false
3739

3840
rbac:
3941
# create/don't create Cluster Role and Cluster Role Bindings
@@ -92,6 +94,9 @@ daemonset:
9294

9395
tag: "latest"
9496

97+
# for autopilot
98+
url: ""
99+
95100
# These values are the recommended values for cortex agent
96101
# and are not recommended to change!
97102
resources:

0 commit comments

Comments
 (0)