replace init container with fsGroup security context in example k8s deployment

This commit is contained in:
El RIDO 2021-11-10 07:14:26 +01:00
parent e046f8d45b
commit bd0b6ae841
No known key found for this signature in database
GPG key ID: 0F5C940A6BD81F92

View file

@ -85,17 +85,10 @@ spec:
labels: labels:
app: privatebin app: privatebin
spec: spec:
initContainers:
- name: privatebin-volume-permissions
image: privatebin/chown:1.33.0-musl-1.2.2-r0
args: ['65534:82', '/mnt']
securityContext: securityContext:
runAsUser: 0 runAsUser: 65534
readOnlyRootFilesystem: true runAsGroup: 82
volumeMounts: fsGroup: 82
- mountPath: /mnt
name: privatebin-data
readOnly: False
containers: containers:
- name: privatebin - name: privatebin
image: privatebin/nginx-fpm-alpine:1.3.5 image: privatebin/nginx-fpm-alpine:1.3.5
@ -107,8 +100,6 @@ spec:
- name: PHP_TZ - name: PHP_TZ
value: Antarctica/South_Pole value: Antarctica/South_Pole
securityContext: securityContext:
runAsUser: 65534
runAsGroup: 82
readOnlyRootFilesystem: true readOnlyRootFilesystem: true
privileged: false privileged: false
allowPrivilegeEscalation: false allowPrivilegeEscalation: false