Skip to content

Commit

Permalink
Merge pull request #90 from jjouanno-kwaku-it/master
Browse files Browse the repository at this point in the history
Manage securityContext and podSecurityContext from values.yaml file
  • Loading branch information
elrido authored Mar 11, 2024
2 parents 49685d0 + f8e21d2 commit 11ee63b
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
2 changes: 1 addition & 1 deletion charts/privatebin/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ name: privatebin
home: https://privatebin.info/
icon: https://raw.githubusercontent.com/PrivateBin/assets/master/images/preview/icon.png
type: application
version: 0.20.1
version: 0.21.0
maintainers:
- name: bdashrad
email: [email protected]
Expand Down
16 changes: 10 additions & 6 deletions charts/privatebin/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,12 @@ spec:
spec:
serviceAccountName: {{ include "privatebin.serviceAccountName" . }}
automountServiceAccountToken: false
{{- if .Values.securityContext }}
securityContext:
runAsUser: {{ .Values.securityContext.runAsUser }}
runAsGroup: {{ .Values.securityContext.runAsGroup }}
fsGroup: {{ .Values.securityContext.fsGroup }}
{{- with .Values.securityContext }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
{{- if .Values.image.pullSecrets }}
imagePullSecrets:
{{- range .Values.image.pullSecrets }}
Expand All @@ -52,10 +54,12 @@ spec:
- name: http
containerPort: 8080
protocol: TCP
{{- if .Values.podSecurityContext }}
securityContext:
readOnlyRootFilesystem: {{ .Values.securityContext.readOnlyRootFilesystem }}
privileged: false
allowPrivilegeEscalation: false
{{- with .Values.podSecurityContext }}
{{- toYaml . | nindent 12 }}
{{- end }}
{{- end }}
livenessProbe:
httpGet:
path: /
Expand Down
4 changes: 4 additions & 0 deletions charts/privatebin/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,11 @@ securityContext:
runAsUser: 65534
runAsGroup: 82
fsGroup: 82

podSecurityContext:
readOnlyRootFilesystem: true
privileged: false
allowPrivilegeEscalation: false

extraVolumes: []
# Optionally specify extra list of additional volumes for PrivateBin pod.
Expand Down

0 comments on commit 11ee63b

Please sign in to comment.