mirror of
https://github.com/amkartashov/gf-k8s.git
synced 2026-01-11 09:59:43 +00:00
postgres: PVC -> hostPath
This commit is contained in:
parent
9e58cfbc32
commit
26f14db943
1 changed files with 5 additions and 20 deletions
|
|
@ -1,22 +1,4 @@
|
||||||
---
|
---
|
||||||
kind: PersistentVolume
|
|
||||||
apiVersion: v1
|
|
||||||
metadata:
|
|
||||||
name: postgres
|
|
||||||
labels:
|
|
||||||
type: local
|
|
||||||
name: postgres
|
|
||||||
spec:
|
|
||||||
storageClassName: manual
|
|
||||||
capacity:
|
|
||||||
storage: 5Gi
|
|
||||||
accessModes:
|
|
||||||
- ReadWriteOnce
|
|
||||||
hostPath:
|
|
||||||
path: /data/postgres
|
|
||||||
# mkdir -p /data/postgres
|
|
||||||
# chown 999.999 /data/postgres
|
|
||||||
---
|
|
||||||
kind: PersistentVolumeClaim
|
kind: PersistentVolumeClaim
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
metadata:
|
metadata:
|
||||||
|
|
@ -49,9 +31,12 @@ spec:
|
||||||
app: postgres
|
app: postgres
|
||||||
spec:
|
spec:
|
||||||
volumes:
|
volumes:
|
||||||
|
# mkdir -p /data/postgres
|
||||||
|
# chown 999.999 /data/postgres
|
||||||
- name: postgres
|
- name: postgres
|
||||||
persistentVolumeClaim:
|
hostPath:
|
||||||
claimName: postgres
|
path: /data/postgres
|
||||||
|
type:
|
||||||
containers:
|
containers:
|
||||||
- name: postgres
|
- name: postgres
|
||||||
image: postgres
|
image: postgres
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue