Skip to content

Commit 4bc6f54

Browse files
committed
[defectdojo] Disable gVisor for runtime for Dojo
google/gvisor#1441
1 parent 320f885 commit 4bc6f54

File tree

1 file changed

+10
-13
lines changed

1 file changed

+10
-13
lines changed

defectdojo/deployment.yaml

+10-13
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,13 @@ spec:
2929
service: ${SERVICE}
3030
spec:
3131
serviceAccountName: ${SERVICE_ACCOUNT}
32-
runtimeClassName: gvisor
33-
securityContext:
34-
runAsUser: 65534 # nobody
35-
runAsGroup: 0 # required by DefectDojo
36-
runAsNonRoot: true
32+
nodeSelector:
33+
sandbox.gke.io/runtime: gvisor
34+
tolerations:
35+
- key: sandbox.gke.io/runtime
36+
operator: Equal
37+
value: gvisor
38+
effect: NoSchedule
3739

3840
containers:
3941
- name: nginx
@@ -88,10 +90,6 @@ spec:
8890
name: ${CELERY_CONFIG}
8991
- secretRef:
9092
name: ${CELERY_SECRET}
91-
securityContext:
92-
capabilities:
93-
add:
94-
- NET_RAW
9593

9694
- name: celeryworker
9795
image: ${DD_DJANGO_IMAGE}
@@ -106,10 +104,6 @@ spec:
106104
name: ${CELERY_CONFIG}
107105
- secretRef:
108106
name: ${CELERY_SECRET}
109-
securityContext:
110-
capabilities:
111-
add:
112-
- NET_RAW
113107

114108
- name: rabbitmq
115109
image: rabbitmq
@@ -146,6 +140,9 @@ spec:
146140
command:
147141
- /cloud_sql_proxy
148142
- -instances=${SQL_INSTANCE_URI}
143+
securityContext:
144+
runAsUser: 2 # non-root user
145+
allowPrivilegeEscalation: false
149146
---
150147
apiVersion: iam.cnrm.cloud.google.com/v1beta1
151148
kind: IAMPolicyMember

0 commit comments

Comments
 (0)