Skip to content

Commit

Permalink
Added more security context
Browse files Browse the repository at this point in the history
  • Loading branch information
alfredeen committed May 6, 2024
1 parent 20c0e65 commit 6b0c90f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
9 changes: 6 additions & 3 deletions manifests/base/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,17 @@ spec:
selector:
matchLabels:
app: locust
securityContext:
runAsNonRoot: true
allowPrivilegeEscalation: false
template:
metadata:
labels:
app: locust
annotations:
statefulset.kubernetes.io/pod-name: locust
spec:
securityContext:
runAsNonRoot: true
seccompProfile:
type: RuntimeDefault
containers:
- name: locust
image: ghcr.io/scilifelabdatacentre/serve-load-testing:main-20240503-1109
Expand All @@ -26,6 +27,8 @@ spec:
envFrom:
- secretRef:
name: locust-secrets
securityContext:
allowPrivilegeEscalation: false
resources:
limits:
cpu: "1"
Expand Down
6 changes: 6 additions & 0 deletions manifests/base/postgres-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ spec:
labels:
app: postgres
spec:
securityContext:
runAsNonRoot: true
seccompProfile:
type: RuntimeDefault
containers:
- name: postgres
image: cyberw/locust-timescale:6 #postgres:latest
Expand All @@ -45,6 +49,8 @@ spec:
name: postgres-secret
ports:
- containerPort: 5432
securityContext:
allowPrivilegeEscalation: false
resources:
limits:
cpu: "2"
Expand Down

0 comments on commit 6b0c90f

Please sign in to comment.