Skip to content

Commit

Permalink
improve pod security per snyk scan
Browse files Browse the repository at this point in the history
Signed-off-by: Scott Trent <[email protected]>
  • Loading branch information
trent-s committed Sep 10, 2024
1 parent e079d6c commit 4c660b3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
Empty file.
9 changes: 9 additions & 0 deletions deployment/susql-controller/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ spec:
selector:
matchLabels:
sustainable-computing.io/app: {{ .Values.name }}
securityContext:
runAsUser: 10001
runAsGroup: 10001
template:
metadata:
name: {{ .Values.name }}
Expand All @@ -23,6 +26,12 @@ spec:
- name: {{ .Values.name }}
image: {{ required "Please specify a 'containerImage' in the user file" .Values.containerImage }}
imagePullPolicy: {{ .Values.imagePullPolicy | default "Always" }}
securityContext:
allowPrivilegeEscalation: false
runAsNonRoot: true
capabilities:
drop:
- "ALL"
args:
- "--kepler-prometheus-url={{ .Values.keplerPrometheusUrl }}"
- "--kepler-metric-name={{ .Values.keplerMetricName }}"
Expand Down

0 comments on commit 4c660b3

Please sign in to comment.