Skip to content

Commit 73e36a2

Browse files
committed
add autopilot support
1 parent e20766e commit 73e36a2

File tree

4 files changed

+34
-1
lines changed

4 files changed

+34
-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: 14 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
@@ -106,6 +111,10 @@ spec:
106111
value: {{ .Values.agent.clusterName | quote }}
107112
- name: XDR_VAR_LOG_HOST_PATH
108113
value: {{ include "cortex-xdr.XdrVarLogHostPath" . | quote }}
114+
{{- if .Values.platform.autopilot }}
115+
- name: XDR_CLUSTER_TYPE
116+
value: "autopilot"
117+
{{- end }}
109118

110119
volumeMounts:
111120

@@ -116,8 +125,10 @@ spec:
116125
- name: var-log
117126
mountPath: /var/log
118127

128+
{{- if not (or .Values.platform.autopilot .Values.platform.bottlerocket) }}
119129
- name: host-km-directory
120130
mountPath: /lib/modules
131+
{{- end }}
121132

122133
- name: pod-info
123134
mountPath: /var/run/pod-info
@@ -150,10 +161,12 @@ spec:
150161
path: {{ include "cortex-xdr.XdrVarLogHostPath" . | quote }}
151162
type: DirectoryOrCreate
152163

164+
{{- if not .Values.platform.autopilot }}
153165
- name: host-km-directory
154166
hostPath:
155167
path: /lib/modules
156168
type: Directory
169+
{{- end }}
157170

158171
- name: pod-info
159172
downwardAPI:

charts/cortex-agent/values.yaml

Lines changed: 7 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,15 +94,20 @@ 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:
98103
limits:
99104
cpu: "1500m"
100105
memory: "2Gi"
106+
ephemeral-storage: "5Gi"
101107
requests:
102108
cpu: "200m"
103109
memory: "600Mi"
110+
ephemeral-storage: "10Gi"
104111
selinuxOptionsSpcT: false
105112

106113
namespace:

0 commit comments

Comments
 (0)