فهرست منبع

Añado Makefile

Celestino Rey 6 ماه پیش
والد
کامیت
acb4f71419
1فایلهای تغییر یافته به همراه43 افزوده شده و 0 حذف شده
  1. 43 0
      K8S/Makefile

+ 43 - 0
K8S/Makefile

@@ -0,0 +1,43 @@
+export REGISTRO=harbor.reymota.es\/finanzas
+export IMG_VERSION = alpine-1
+export NAMESPACE = jugaralpadel
+
+# limpia todo
+all: imagen clean install
+
+imagen:
+	cd ../; make
+
+ns:
+	-cat namespace.yaml | sed -e "s/<NS>/${NAMESPACE}/" |kubectl create -f -
+
+install:
+	-cat reg-secret.yaml| sed -e "s/<NS>/${NAMESPACE}/" | kubectl create -f -
+	-cat env-prod-configmap.yaml | sed -e "s/<NS>/${NAMESPACE}/" | kubectl create -f -
+	-cat secreto-db.yaml| sed -e "s/<NS>/${NAMESPACE}/" | kubectl create -f -
+
+	-cat finanzas-deployment.yaml | sed -e "s/<NS>/${NAMESPACE}/" | sed -e "s/<TAG>/${IMG_VERSION}/" | sed -e "s/<REGISTRO>/${REGISTRO}/" | kubectl create -f -
+	-cat finanzas-ingress.yaml | sed -e "s/<NS>/${NAMESPACE}/" | kubectl create -f -
+
+clean:
+	-cat finanzas-ingress.yaml | sed -e "s/<NS>/${NAMESPACE}/" | kubectl delete -f -
+	-cat finanzas-deployment.yaml | sed -e "s/<NS>/${NAMESPACE}/" | sed -e "s/<TAG>/${IMG_VERSION}/" | sed -e "s/<REGISTRO>/${REGISTRO}/" | kubectl delete -f -
+
+	-cat secreto-db.yaml| sed -e "s/<NS>/${NAMESPACE}/" | kubectl delete -f -
+	-cat env-prod-configmap.yaml  | sed -e "s/<NS>/${NAMESPACE}/" | kubectl delete -f -
+	-cat reg-secret.yaml | sed -e "s/<NS>/${NAMESPACE}/" | kubectl delete -f -
+
+borraclaims:
+	-cat pvc-finanzas.yaml | sed -e "s/<NS>/${NAMESPACE}/" | kubectl delete -f -
+	-cat pvc-static.yaml | sed -e "s/<NS>/${NAMESPACE}/" | kubectl delete -f -
+
+claims:
+	-cat pvc-finanzas.yaml | sed -e "s/<NS>/${NAMESPACE}/" | kubectl create -f -
+	-cat pvc-static.yaml | sed -e "s/<NS>/${NAMESPACE}/" | kubectl create -f -
+
+app:
+	-cat finanzas-deployment.yaml | sed -e "s/<NS>/${NAMESPACE}/" | sed -e "s/<TAG>/${IMG_VERSION}/" | sed -e "s/<REGISTRO>/${REGISTRO}/" | kubectl delete -f -
+	-cat finanzas-deployment.yaml | sed -e "s/<NS>/${NAMESPACE}/" | sed -e "s/<TAG>/${IMG_VERSION}/" | sed -e "s/<REGISTRO>/${REGISTRO}/" | kubectl create -f -
+
+db:
+	-kubectl create -f finanzas-db.yaml