You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

71 lines
2.2 KiB

export ARQUITECTURA := $(shell lscpu |grep itectur | tr -d ' '| cut -f2 -d':')
#export REGISTRY=registry.cube.local
export REGISTRY=registry.reymota.es
export IMG_VERSION = 0.56
export IMG_NGINX_VERSION = 1.0
# limpia todo
all: imagen clean install
imagen:
cd ../; make
install:
# Secreto y configmaps
-kubectl create -f reg-secret.yaml
-kubectl create -f ./ConfigMaps/env-prod-configmap.yaml
-kubectl create -f ./ConfigMaps/env-prod-db-configmap.yaml
# Deployments
-kubectl create -f ./Deployments/db-deployment.yaml
-envsubst < ./Deployments/reymota-deployment.yaml |kubectl create -f -
-envsubst < ./Deployments/nginx-deployment.yaml |kubectl create -f -
# Servicios
-kubectl create -f ./Services/db-service.yaml
-kubectl create -f ./Services/reymota-service.yaml
-kubectl create -f ./Services/nginx-service.yaml
-kubectl create -f ./Services/reymota-ingress.yaml
clean:
# Deployments
-envsubst < ./Deployments/nginx-deployment.yaml |kubectl delete -f -
-envsubst < ./Deployments/reymota-deployment.yaml |kubectl delete -f -
-kubectl delete -f ./Deployments/db-deployment.yaml
# Servicios
-kubectl delete -f ./Services/reymota-ingress.yaml
-kubectl delete -f ./Services/reymota-service.yaml
-kubectl delete -f ./Services/nginx-service.yaml
-kubectl delete -f ./Services/db-service.yaml
# Secreto y configmaps
-kubectl delete -f ./ConfigMaps/env-prod-configmap.yaml
-kubectl delete -f ./ConfigMaps/env-prod-db-configmap.yaml
-kubectl delete -f reg-secret.yaml
nginx:
cd ../nginx; make
backup:
kubectl --kubeconfig /home/creylopez/.kube/config -n reymota exec -ti deployment.apps/db -- /usr/lib/postgresql/15/bin/pg_dump --username=creylopez --dbname=reymota > reymota-$(IMG_VERSION).sql
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