Browse Source

change postgresql storage to NFS

dotbalo 6 years ago
parent
commit
a9097a9207
3 changed files with 20 additions and 1 deletions
  1. 1 0
      README.md
  2. 18 0
      gitlab/pg-pv.yaml
  3. 1 1
      gitlab/postgresql-rc.yml

+ 1 - 0
README.md

@@ -5,4 +5,5 @@
     Install openLDAP: https://www.cnblogs.com/dukuan/p/9983899.html
     Install Redis Sentinel: https://www.cnblogs.com/dukuan/p/9913420.html
     Install Redis Cluster: https://github.com/dotbalo/k8s/tree/master/redis/k8s-redis-cluster
+    Install GitLab: https://www.cnblogs.com/dukuan/p/10036489.html
 ````

+ 18 - 0
gitlab/pg-pv.yaml

@@ -0,0 +1,18 @@
+apiVersion: v1
+kind: PersistentVolume
+metadata:
+  name: gitlab-pg-data
+spec:
+  capacity:
+    storage: 5Gi
+  accessModes:
+    - ReadWriteMany
+  volumeMode: Filesystem
+  persistentVolumeReclaimPolicy: Recycle
+  storageClassName: "gitlab-pg-data"
+  nfs:
+    # real share directory
+    path: /k8s/gitlab-pg
+    # nfs real ip
+    server: 192.168.2.2
+

+ 1 - 1
gitlab/postgresql-rc.yml

@@ -63,7 +63,7 @@ metadata:
   namespace: public-service
 spec:
   accessModes: [ "ReadWriteMany" ]
-  storageClassName: "gluster-heketi"
+  storageClassName: "gitlab-pg-data"
   resources:
     requests:
       storage: 5Gi