diff --git a/kustomize/deployment.yaml b/kustomize/deployment.yaml index 18ad462..e7cdf28 100644 --- a/kustomize/deployment.yaml +++ b/kustomize/deployment.yaml @@ -41,3 +41,10 @@ spec: port: 4567 initialDelaySeconds: 5 periodSeconds: 5 + volumeMounts: + mountPath: /data + name: data + volumes: + - name: data + persistentVolumeClaim: + claimName: volume-claim diff --git a/kustomize/kustomization.yaml b/kustomize/kustomization.yaml index 251340f..7cdab2c 100644 --- a/kustomize/kustomization.yaml +++ b/kustomize/kustomization.yaml @@ -3,6 +3,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization namespace: toy resources: + - storage.yaml - deployment.yaml - services.yaml - ingress.yaml diff --git a/kustomize/storage.yaml b/kustomize/storage.yaml new file mode 100644 index 0000000..1712b77 --- /dev/null +++ b/kustomize/storage.yaml @@ -0,0 +1,11 @@ +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: volume-claim +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 2Gi