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:
parent
8a2f167cd9
commit
17ad2c9ce8
@ -23,6 +23,8 @@ spec:
|
|||||||
labels:
|
labels:
|
||||||
app: postgres
|
app: postgres
|
||||||
spec:
|
spec:
|
||||||
|
securityContext:
|
||||||
|
fsGroup: 999
|
||||||
containers:
|
containers:
|
||||||
- name: postgres
|
- name: postgres
|
||||||
image: postgres:13
|
image: postgres:13
|
||||||
@ -33,24 +35,18 @@ spec:
|
|||||||
value: "plankauser"
|
value: "plankauser"
|
||||||
- name: POSTGRES_PASSWORD
|
- name: POSTGRES_PASSWORD
|
||||||
value: "8148"
|
value: "8148"
|
||||||
|
- name: PGDATA
|
||||||
|
value: "/var/lib/postgresql/data/pgdata"
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 5432
|
- containerPort: 5432
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: postgres-storage
|
- name: postgres-storage
|
||||||
mountPath: /var/lib/postgresql/data
|
mountPath: "/var/lib/postgresql/data"
|
||||||
|
securityContext:
|
||||||
|
runAsUser: 999 # Пользователь, от имени которого запускается процесс
|
||||||
|
runAsGroup: 999 # Группа, от имени которой запускается процесс
|
||||||
|
allowPrivilegeEscalation: false
|
||||||
volumes:
|
volumes:
|
||||||
- name: postgres-storage
|
- name: postgres-storage
|
||||||
persistentVolumeClaim:
|
persistentVolumeClaim:
|
||||||
claimName: postgres-pvc
|
claimName: postgres-pvc
|
||||||
---
|
|
||||||
apiVersion: v1
|
|
||||||
kind: PersistentVolumeClaim
|
|
||||||
metadata:
|
|
||||||
name: postgres-pvc
|
|
||||||
namespace: planka
|
|
||||||
spec:
|
|
||||||
accessModes:
|
|
||||||
- ReadWriteOnce
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
storage: 1Gi
|
|
||||||
12
k3s_config/Planka/postgres_pvc.yaml
Normal file
12
k3s_config/Planka/postgres_pvc.yaml
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: postgres-pvc
|
||||||
|
namespace: planka
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 10Gi
|
||||||
|
storageClassName: longhorn
|
||||||
Loading…
Reference in New Issue
Block a user