diff --git a/ReyMotaAppsRancher/K8S/Deployments/reymota-deployment.yaml b/ReyMotaAppsRancher/K8S/Deployments/reymota-deployment.yaml index 164d3f8..f778a67 100644 --- a/ReyMotaAppsRancher/K8S/Deployments/reymota-deployment.yaml +++ b/ReyMotaAppsRancher/K8S/Deployments/reymota-deployment.yaml @@ -103,7 +103,7 @@ spec: name: reymota-reymotausers-migrations - mountPath: /app/reymota/staticfiles - name: static-volume + name: prueba-volume imagePullSecrets: - name: myregistrykey restartPolicy: Always @@ -120,7 +120,7 @@ spec: - name: reymota-reymotausers-migrations persistentVolumeClaim: claimName: reymota-reymotausers-migrations - - name: static-volume + - name: prueba-volume persistentVolumeClaim: claimName: static-volume status: {} diff --git a/ReyMotaAppsRancher/K8S/Makefile b/ReyMotaAppsRancher/K8S/Makefile index c47c2dc..589f85b 100644 --- a/ReyMotaAppsRancher/K8S/Makefile +++ b/ReyMotaAppsRancher/K8S/Makefile @@ -48,6 +48,7 @@ clean: -kubectl delete -f ./ConfigMaps/env-prod-configmap.yaml -kubectl delete -f ./ConfigMaps/env-prod-db-configmap.yaml + -kubectl delete -f reg-secret.yaml nginx: @@ -58,3 +59,13 @@ backup: muestra: -envsubst < reymota-deployment.yaml > /tmp/deployment.yaml + +pvc-install: + -kubectl create -f PVC/postgres-data-persistentvolumeclaim.yaml + -kubectl create -f PVC/reymota-prod-persistentvolumeclaim.yaml + -kubectl create -f PVC/static-volume-persistentvolumeclaim.yaml + +pvc-clean: + -kubectl delete -f PVC/postgres-data-persistentvolumeclaim.yaml + -kubectl delete -f PVC/reymota-prod-persistentvolumeclaim.yaml + -kubectl delete -f PVC/static-volume-persistentvolumeclaim.yaml diff --git a/ReyMotaAppsRancher/K8S/PVC/prueba-pvc.yaml b/ReyMotaAppsRancher/K8S/PVC/prueba-pvc.yaml new file mode 100644 index 0000000..27c3b13 --- /dev/null +++ b/ReyMotaAppsRancher/K8S/PVC/prueba-pvc.yaml @@ -0,0 +1,13 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + labels: + io.kompose.service: prueba-volume + name: prueba-volume + namespace: ranchermota +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 70Mi