Skip to content

Commit 9d8e9c7

Browse files
primary-site: restrict security context more (#152)
### Changelog <!-- Write a one-sentence summary of the user-impacting change (API, UI/UX, performance, etc) that could appear in a changelog. Write "None" if there is no user-facing change --> - Restrict security context more with readonly root fs, dropped capabilities and seccomp profile ### Docs <!-- Link to a Docs PR, tracking ticket in Linear, OR write "None" if no documentation changes are needed. --> None ### Description Ensures the following is set for all pods: ```yaml securityContext: readOnlyRootFilesystem: true capabilities: drop: - ALL seccompProfile: type: RuntimeDefault ```
1 parent 7135c93 commit 9d8e9c7

File tree

4 files changed

+24
-0
lines changed

4 files changed

+24
-0
lines changed

charts/primary-site/templates/cronjobs/garbage-collector.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,16 @@ spec:
3434
- name: garbage-collector
3535
image: {{ .Values.garbageCollector.deployment.image }}:{{ .Chart.AppVersion }}
3636
securityContext:
37+
readOnlyRootFilesystem: true
38+
capabilities:
39+
drop:
40+
- ALL
3741
allowPrivilegeEscalation: false
3842
runAsNonRoot: true
3943
runAsUser: 65534
4044
runAsGroup: 65534
45+
seccompProfile:
46+
type: RuntimeDefault
4147
volumeMounts:
4248
- mountPath: /secrets
4349
name: cloud-credentials

charts/primary-site/templates/deployments/_inbox-container.tpl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,15 @@ template:
4242
image: {{ .Values.inboxListener.deployment.image }}:{{ .Chart.AppVersion }}
4343
securityContext:
4444
allowPrivilegeEscalation: false
45+
capabilities:
46+
drop:
47+
- ALL
48+
readOnlyRootFilesystem: true
4549
runAsNonRoot: true
4650
runAsUser: 65534
4751
runAsGroup: 65534
52+
seccompProfile:
53+
type: RuntimeDefault
4854
resources:
4955
requests:
5056
cpu: {{ .Values.inboxListener.deployment.resources.requests.cpu }}

charts/primary-site/templates/deployments/query-server.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,15 @@ spec:
4545
image: {{ $values.deployment.image }}:{{ .Chart.AppVersion }}
4646
securityContext:
4747
allowPrivilegeEscalation: false
48+
capabilities:
49+
drop:
50+
- ALL
51+
readOnlyRootFilesystem: true
4852
runAsNonRoot: true
4953
runAsUser: 65534
5054
runAsGroup: 65534
55+
seccompProfile:
56+
type: RuntimeDefault
5157
resources:
5258
requests:
5359
cpu: {{ $values.deployment.resources.requests.cpu }}

charts/primary-site/templates/deployments/site-controller.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,15 @@ spec:
3737
image: {{ .Values.siteController.deployment.image }}:{{ .Chart.AppVersion }}
3838
securityContext:
3939
allowPrivilegeEscalation: false
40+
capabilities:
41+
drop:
42+
- ALL
43+
readOnlyRootFilesystem: true
4044
runAsNonRoot: true
4145
runAsUser: 65534
4246
runAsGroup: 65534
47+
seccompProfile:
48+
type: RuntimeDefault
4349
resources:
4450
requests:
4551
cpu: {{ .Values.siteController.deployment.resources.requests.cpu }}

0 commit comments

Comments
 (0)