Skip to content

Commit

Permalink
fix(vaulwarden): run as non root
Browse files Browse the repository at this point in the history
  • Loading branch information
achauve committed Nov 10, 2023
1 parent 25c2e6e commit b4d3498
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ spec:
tolerations:
{{- toYaml .Values.tolerations | nindent 8 }}
{{- end }}
securityContext:
runAsUser: {{ .Values.runAsUser }}
runAsGroup: {{ .Values.runAsUser }}
fsGroup: {{ .Values.runAsUser }}
{{- if .Values.initContainers }}
initContainers:
{{- toYaml .Values.initContainers | nindent 8 }}
Expand All @@ -58,6 +62,8 @@ spec:
envFrom:
- configMapRef:
name: {{ include "vaultwarden.fullname" . }}
securityContext:
allowPrivilegeEscalation: false
env:
{{- if or (.Values.smtp.username.value) (.Values.smtp.username.existingSecretKey )}}
- name: SMTP_USERNAME
Expand Down
9 changes: 9 additions & 0 deletions charts/vaultwarden/charts/vaultwarden/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,15 @@ serviceAccount:
name: "vaultwarden-svc"


## @param runAsUser user ID for VaultWarden and backup run with
##
runAsUser: 1100

## @param runAsGroup group ID for VaultWarden and backup run with
## Same as default user for vaultwarden-backup
runAsGroup: 1100


## @section Exposure Parameters
##

Expand Down

0 comments on commit b4d3498

Please sign in to comment.