Use initContainers to fix the permissions

This commit is contained in:
斟酌 鵬兄 2022-03-16 01:27:38 +09:00
parent 923dfc5ba1
commit 9bd7f03301

View File

@ -18,6 +18,18 @@ spec:
runAsUser: 1001
imagePullSecrets:
- name: registry-auth
initContainers:
- name: init-dir
image: alpine:latest
command:
- chown
- 1001:1001
- /app/cache
securityContext:
runAsNonRoot: false
volumeMounts:
- name: cache
mountPath: "/app/cache"
containers:
- name: web
image: registry.k8s.astropenguin.net/astrojs:2022.03.15.04
@ -56,7 +68,7 @@ spec:
accessModes: [ "ReadWriteOnce" ]
resources:
requests:
storage: 10Gi
storage: 1Gi
storageClassName: local-storage
---