Skip to content

Commit b0f740f

Browse files
authored
Merge pull request #33 from tabudipanw/master
helm: Add BottlerocketOS support
2 parents aced5ce + 0e44cbd commit b0f740f

File tree

5 files changed

+29
-3
lines changed

5 files changed

+29
-3
lines changed

charts/cortex-agent/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: Cortex XDR agent helm chart
55

66
type: application
77

8-
version: 1.6.2
8+
version: 1.6.3
99

1010
appVersion: 1.0.0
1111

charts/cortex-agent/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
| 1.6.0 | >=7.5 |
1414
| 1.6.1 | >=7.5 | Namespace is created by the chart and no longer by helm itself. Therefore the helm namespace will be `default` (unless chosen otherwise).
1515
| 1.6.2 | >=7.5 |
16+
| 1.6.3 | >=7.5 |
1617

1718
## Installing Cortex XDR helm chart
1819

@@ -94,6 +95,7 @@ Even when using `--reuse-values` (which uses the values of the previous installa
9495
| `serviceAccount.openshift.scc.create` | Enable `SecurityConstraintsContext` for openshift platform (Required when installing on openshift) |
9596
| `platform.talos` | Support for TalOS platform (Required when installing on TalOS) | Since 1.5.0, agent >= 8.2
9697
| `platform.gcos` | Support for GCOS (Google Container-Optimized OS) platform (Required when installing on GCOS) | Since 1.5.0, agent >= 8.2
98+
| `platform.bottlerocket` | Support for BottlerocketOS platform (Required when installing on BottlerocketOS) | Since 1.6.3, agent >= 8.3
9799
| `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
98100
| `namespace.name` | Name of the namespace the agent resides on | Since 1.6.0
99101
| `namespace.create` | Create/Don't create namespace for the agent | Since 1.6.0

charts/cortex-agent/templates/_helpers.tpl

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,3 +83,14 @@ Create the name of the service account to use
8383
{{- default "default" .Values.serviceAccount.name }}
8484
{{- end }}
8585
{{- end }}
86+
87+
{{/*
88+
Create the path of the /var/log volume mount on the host fs
89+
*/}}
90+
{{- define "cortex-xdr.XdrVarLogHostPath" -}}
91+
{{- if .Values.platform.bottlerocket -}}
92+
/local/traps/var/log
93+
{{- else -}}
94+
/var/log
95+
{{- end }}
96+
{{- end }}

charts/cortex-agent/templates/daemonset.yaml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@ spec:
5151
imagePullPolicy: {{ .Values.daemonset.image.pullPolicy }}
5252

5353
securityContext:
54+
{{- if .Values.platform.bottlerocket }}
55+
seLinuxOptions:
56+
type: super_t
57+
{{- end }}
5458
capabilities:
5559
add:
5660
- SYS_ADMIN
@@ -89,6 +93,8 @@ spec:
8993
{{- end }}
9094
- name: XDR_CLUSTER_NAME
9195
value: {{ .Values.agent.clusterName | quote }}
96+
- name: XDR_VAR_LOG_HOST_PATH
97+
value: {{ include "cortex-xdr.XdrVarLogHostPath" . | quote }}
9298

9399
volumeMounts:
94100

@@ -130,8 +136,8 @@ spec:
130136

131137
- name: var-log
132138
hostPath:
133-
path: /var/log
134-
type: Directory
139+
path: {{ include "cortex-xdr.XdrVarLogHostPath" . | quote }}
140+
type: DirectoryOrCreate
135141

136142
- name: host-km-directory
137143
hostPath:
@@ -159,6 +165,11 @@ spec:
159165
hostPath:
160166
path: /var/traps/etc/traps
161167
type: DirectoryOrCreate
168+
{{- else if .Values.platform.bottlerocket }}
169+
- name: agent-ids
170+
hostPath:
171+
path: /local/traps/etc/traps
172+
type: DirectoryOrCreate
162173
{{- else if not .Values.platform.talos }}
163174
- name: agent-ids
164175
hostPath:

charts/cortex-agent/values.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ platform:
3232
talos: false
3333
# Deploy on GCOS platform
3434
gcos: false
35+
# Deploy on bottlerocket platform
36+
bottlerocket: false
3537

3638
rbac:
3739
# create/don't create Cluster Role and Cluster Role Bindings

0 commit comments

Comments
 (0)