renamed: k3s_config/Planka/postgres.yaml -> k3s_config/Planka/postgres_deployment.yaml

new file:   k3s_config/Planka/postgres_pvc.yaml
This commit is contained in:
root 2024-11-03 01:12:12 +03:00
parent 8a2f167cd9
commit 17ad2c9ce8
2 changed files with 21 additions and 13 deletions

View File

@ -23,6 +23,8 @@ spec:
labels:
app: postgres
spec:
securityContext:
fsGroup: 999
containers:
- name: postgres
image: postgres:13
@ -33,24 +35,18 @@ spec:
value: "plankauser"
- name: POSTGRES_PASSWORD
value: "8148"
- name: PGDATA
value: "/var/lib/postgresql/data/pgdata"
ports:
- containerPort: 5432
volumeMounts:
- name: postgres-storage
mountPath: /var/lib/postgresql/data
mountPath: "/var/lib/postgresql/data"
securityContext:
runAsUser: 999 # Пользователь, от имени которого запускается процесс
runAsGroup: 999 # Группа, от имени которой запускается процесс
allowPrivilegeEscalation: false
volumes:
- name: postgres-storage
persistentVolumeClaim:
claimName: postgres-pvc
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: postgres-pvc
namespace: planka
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi

View File

@ -0,0 +1,12 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: postgres-pvc
namespace: planka
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi
storageClassName: longhorn