From 7ab2c1fde30770fa05480992701d191b247cf293 Mon Sep 17 00:00:00 2001 From: Rido Akbar Ibrahim Date: Wed, 22 Dec 2021 20:42:53 +0700 Subject: [PATCH 1/2] add pvc --- k8s/staging/deployment.yaml | 7 +++++++ k8s/staging/pvc.yaml | 13 +++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 k8s/staging/pvc.yaml diff --git a/k8s/staging/deployment.yaml b/k8s/staging/deployment.yaml index 6d3e967..9ca2ae7 100644 --- a/k8s/staging/deployment.yaml +++ b/k8s/staging/deployment.yaml @@ -21,6 +21,13 @@ spec: envFrom: - secretRef: name: ppob-backend-env + volumeMounts: + - name: storage + mountPath: /usr/src/app/files + volumes: + - name: storage + persistentVolumeClaim: + claimName: ppob-backend-pvc imagePullSecrets: - name: regcred diff --git a/k8s/staging/pvc.yaml b/k8s/staging/pvc.yaml new file mode 100644 index 0000000..8d14b9a --- /dev/null +++ b/k8s/staging/pvc.yaml @@ -0,0 +1,13 @@ +kind: PersistentVolumeClaim +apiVersion: v1 +metadata: + name: ppob-backend-pvc + namespace : empatnusabangsa-staging + annotations: + volume.beta.kubernetes.io/storage-class: "managed-nfs-storage" +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 10Gi From d0c9d90e3aac1ee9f82f4ac68cb0ffc12b26736c Mon Sep 17 00:00:00 2001 From: Rido Akbar Ibrahim Date: Wed, 22 Dec 2021 20:57:13 +0700 Subject: [PATCH 2/2] add pvc --- k8s/staging/deployment.yaml | 2 +- k8s/staging/pvc.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/k8s/staging/deployment.yaml b/k8s/staging/deployment.yaml index 9ca2ae7..217c96e 100644 --- a/k8s/staging/deployment.yaml +++ b/k8s/staging/deployment.yaml @@ -23,7 +23,7 @@ spec: name: ppob-backend-env volumeMounts: - name: storage - mountPath: /usr/src/app/files + mountPath: /home/node/files volumes: - name: storage persistentVolumeClaim: diff --git a/k8s/staging/pvc.yaml b/k8s/staging/pvc.yaml index 8d14b9a..5b3fc42 100644 --- a/k8s/staging/pvc.yaml +++ b/k8s/staging/pvc.yaml @@ -7,7 +7,7 @@ metadata: volume.beta.kubernetes.io/storage-class: "managed-nfs-storage" spec: accessModes: - - ReadWriteOnce + - ReadWriteMany resources: requests: storage: 10Gi