Skip to content

Commit 53aacbd

Browse files
committed
Optionally lock down package server runtime environment
* Run as non-root by default * Mount a emptyDir volume to /tmp so that the root filesystem can be read-only
1 parent 2c80300 commit 53aacbd

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

deploy/chart/templates/_packageserver.deployment-spec.yaml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,5 +60,15 @@ spec:
6060
{{- if .Values.package.resources }}
6161
resources:
6262
{{ toYaml .Values.package.resources | indent 10 }}
63-
{{- end}}
63+
{{- end }}
64+
{{- if .Values.package.securityContext }}
65+
securityContext:
66+
runAsUser: {{ .Values.package.securityContext.runAsUser }}
67+
{{- end }}
68+
volumeMounts:
69+
- name: tmpfs
70+
mountPath: /tmp
71+
volumes:
72+
- name: tmpfs
73+
emptyDir: {}
6474
{{- end -}}

deploy/upstream/values.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,7 @@ package:
2727
pullPolicy: Always
2828
service:
2929
internalPort: 5443
30+
securityContext:
31+
runAsUser: 1000
3032
catalog_sources:
3133
- rh-operators

0 commit comments

Comments
 (0)