Skip to content

Commit 23a23ea

Browse files
authored
Merge pull request #104 from psact/bottlerocket-dockersock
helm daemonset: Allow mounting the host container runtime socket
2 parents ef3938a + 6456a9e commit 23a23ea

File tree

5 files changed

+49
-1
lines changed

5 files changed

+49
-1
lines changed

charts/core-dump-handler/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ helm install core-dump-handler . --create-namespace --namespace observe \
3939
<tr>
4040
<td>AWS</td><td>EKS with IAM roles for service accounts</td><td><a href="values.aws.sts.yaml">values.aws.yaml</a></td>
4141
</tr>
42+
<tr>
43+
<td>AWS</td><td>EKS with Bottlerocket nodes</td><td><a href="values.aws.bottlerocket.yaml">values.bottlerocket.yaml</a></td>
44+
</tr>
4245
<tr>
4346
<td>AWS</td><td>ROSA</td><td><a href="values.openshift.yaml">values.openshift.yaml</a></td>
4447
</tr>

charts/core-dump-handler/templates/daemonset.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ spec:
3030
- name: core-volume
3131
mountPath: {{ .Values.daemonset.coreDirectory }}
3232
mountPropagation: Bidirectional
33+
{{- if .Values.daemonset.mountContainerRuntimeEndpoint }}
34+
- mountPath: {{ .Values.daemonset.hostContainerRuntimeEndpoint }}
35+
name: container-runtime
36+
{{- end }}
3337
env:
3438
- name: COMP_FILENAME_TEMPLATE
3539
value: {{ .Values.composer.filenameTemplate | quote }}
@@ -115,3 +119,8 @@ spec:
115119
- name: core-volume
116120
persistentVolumeClaim:
117121
claimName: core-storage-pvc
122+
{{- if .Values.daemonset.mountContainerRuntimeEndpoint }}
123+
- name: container-runtime
124+
hostPath:
125+
path: {{ .Values.daemonset.hostContainerRuntimeEndpoint }}
126+
{{- end }}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# AWS requires a crio client to be copied to the server
2+
daemonset:
3+
includeCrioExe: true
4+
deployCrioConfig: true
5+
vendor: default
6+
# Bottlerocket requires the host containerd socket mounted, it is located here as of 1.8.0
7+
# Depending on the outcome of this issue, it may move in the future
8+
# https://github.com/bottlerocket-os/bottlerocket/issues/2212
9+
crioEndpoint: "unix:///run/dockershim.sock"
10+
mountContainerRuntimeEndpoint: true
11+
hostContainerRuntimeEndpoint: "/run/dockershim.sock"
12+
13+
serviceAccount:
14+
annotations:
15+
# See https://docs.aws.amazon.com/eks/latest/userguide/specify-service-account-role.html
16+
eks.amazonaws.com/role-arn: arn:aws:iam::123456789000:role/iam-role-name-here

charts/core-dump-handler/values.schema.json

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,19 @@
171171
"s3Secret"
172172
]
173173
}
174-
}
174+
},
175+
{
176+
"if": {
177+
"properties": {
178+
"mountContainerRuntimeEndpoint": {
179+
"const": true
180+
}
181+
},
182+
"required": [
183+
"hostContainerRuntimeEndpoint"
184+
]
185+
}
186+
}
175187
],
176188
"properties": {
177189
"name": {
@@ -208,6 +220,12 @@
208220
"crioEndpoint": {
209221
"type": "string"
210222
},
223+
"mountContainerRuntimeEndpoint": {
224+
"type": "boolean"
225+
},
226+
"hostContainerRuntimeEndpoint": {
227+
"type": "string"
228+
},
211229
"includeCrioExe": {
212230
"type": "boolean"
213231
},

charts/core-dump-handler/values.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ daemonset:
3434
hostDirectory: "/var/mnt/core-dump-handler"
3535
coreDirectory: "/var/mnt/core-dump-handler/cores"
3636
crioEndpoint: "unix:///run/containerd/containerd.sock"
37+
mountContainerRuntimeEndpoint: false
38+
hostContainerRuntimeEndpoint: "/run/containerd/containerd.sock"
3739
suidDumpable: 2
3840
vendor: default
3941
# interval: 60000

0 commit comments

Comments
 (0)