diff --git a/JugarAlPadel/K8S/Makefile b/JugarAlPadel/K8S/Makefile index f1a1eee..9906902 100644 --- a/JugarAlPadel/K8S/Makefile +++ b/JugarAlPadel/K8S/Makefile @@ -2,7 +2,7 @@ export ARQUITECTURA := $(shell lscpu |grep itectur | tr -d ' '| cut -f2 -d':') #export REGISTRY=localhost:5000 export REGISTRY=registry.reymota.es -export IMG_VERSION = 0.24 +export IMG_VERSION = 0.25 export IMG_NGINX_VERSION = 2.3 # limpia todo diff --git a/JugarAlPadel/K8S/Makefile.local b/JugarAlPadel/K8S/Makefile.local index ce39116..5e73822 100644 --- a/JugarAlPadel/K8S/Makefile.local +++ b/JugarAlPadel/K8S/Makefile.local @@ -2,7 +2,7 @@ export ARQUITECTURA := $(shell lscpu |grep itectur | tr -d ' '| cut -f2 -d':') export REGISTRY=localhost:30500 #export REGISTRY=registry.reymota.es -export IMG_VERSION = 0.61 +export IMG_VERSION = 0.62 export IMG_NGINX_VERSION = 2.4 # limpia todo @@ -14,7 +14,7 @@ imagen: install: -kubectl create -f namespace.yaml -kubectl create -f reg-secret.yaml - -kubectl create -f env-prod-configmap.yaml + -kubectl create -f env-prod-configmap-local.yaml -kubectl create -f env-prod-db-configmap.yaml -kubectl create -f pv-local-jugaralpadel.yaml @@ -37,7 +37,7 @@ clean: -kubectl delete -f db-deployment.yaml -kubectl delete -f db-service.yaml - -kubectl delete -f env-prod-configmap.yaml + -kubectl delete -f env-prod-configmap-local.yaml -kubectl delete -f env-prod-db-configmap.yaml -kubectl delete -f postgres-data-persistentvolumeclaim.yaml diff --git a/JugarAlPadel/K8S/env-prod-configmap-local.yaml b/JugarAlPadel/K8S/env-prod-configmap-local.yaml new file mode 100644 index 0000000..065ab18 --- /dev/null +++ b/JugarAlPadel/K8S/env-prod-configmap-local.yaml @@ -0,0 +1,20 @@ +apiVersion: v1 +data: + DEBUG: "True" + ENTORNO: "Pruebas" + DJANGO_ALLOWED_HOSTS: "jugaralpadel.ddns.net vmcluster reymota.es k8s-server localhost 127.0.0.1 [::1]" + CSRF_TRUSTED_ORIGINS: "https://jugaralpadel.ddns.net http://vmcluster" + SECRET_KEY: change_me + SQL_DATABASE: jugaralpadel + SQL_ENGINE: django.db.backends.postgresql + SQL_HOST: db + SQL_PASSWORD: Dsa-0213 + SQL_PORT: "5432" + SQL_USER: creylopez + DATABASE: postgres +kind: ConfigMap +metadata: + labels: + io.kompose.service: web-env-prod + name: env-prod + namespace: jugaralpadel diff --git a/JugarAlPadel/K8S/env-prod-configmap.yaml b/JugarAlPadel/K8S/env-prod-configmap.yaml index 55ef783..cdbb1f5 100644 --- a/JugarAlPadel/K8S/env-prod-configmap.yaml +++ b/JugarAlPadel/K8S/env-prod-configmap.yaml @@ -1,6 +1,7 @@ apiVersion: v1 data: DEBUG: "False" + ENTORNO: "Producción" DJANGO_ALLOWED_HOSTS: "jugaralpadel.ddns.net vmcluster reymota.es k8s-server localhost 127.0.0.1 [::1]" CSRF_TRUSTED_ORIGINS: "https://jugaralpadel.ddns.net http://vmcluster" SECRET_KEY: change_me diff --git a/JugarAlPadel/K8S/jugaralpadel-deployment.yaml b/JugarAlPadel/K8S/jugaralpadel-deployment.yaml index a579258..4c2bb17 100644 --- a/JugarAlPadel/K8S/jugaralpadel-deployment.yaml +++ b/JugarAlPadel/K8S/jugaralpadel-deployment.yaml @@ -42,7 +42,10 @@ spec: - name: VERSION value: "$IMG_VERSION" - name: ENVIRONMENT - value: "Producción" + valueFrom: + configMapKeyRef: + key: ENTORNO + name: env-prod - name: DEBUG valueFrom: configMapKeyRef: diff --git a/JugarAlPadel/gestion_reservas/templates/_branding.html b/JugarAlPadel/gestion_reservas/templates/_branding.html index d7633ac..47d77c4 100644 --- a/JugarAlPadel/gestion_reservas/templates/_branding.html +++ b/JugarAlPadel/gestion_reservas/templates/_branding.html @@ -3,6 +3,12 @@ {% load filtros_de_entorno %}
diff --git a/ReyMotaAppsDj/K8S/Makefile b/ReyMotaAppsDj/K8S/Makefile index cfb65a6..f5ed111 100644 --- a/ReyMotaAppsDj/K8S/Makefile +++ b/ReyMotaAppsDj/K8S/Makefile @@ -1,7 +1,7 @@ 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.17 +export IMG_VERSION = 0.18 export IMG_NGINX_VERSION = 1.0 # limpia todo diff --git a/ReyMotaAppsDj/K8S/Makefile.local b/ReyMotaAppsDj/K8S/Makefile.local index e48254c..4b877a6 100644 --- a/ReyMotaAppsDj/K8S/Makefile.local +++ b/ReyMotaAppsDj/K8S/Makefile.local @@ -2,7 +2,7 @@ export ARQUITECTURA := $(shell lscpu |grep itectur | tr -d ' '| cut -f2 -d':') export REGISTRY=localhost:30500 #export REGISTRY=registry.reymota.es -export IMG_VERSION = 0.18 +export IMG_VERSION = 0.25 export IMG_NGINX_VERSION = 1.0 # limpia todo @@ -14,7 +14,7 @@ imagen: install: -kubectl create -f namespace.yaml -kubectl create -f reg-secret.yaml - -kubectl create -f env-prod-configmap.yaml + -kubectl create -f env-prod-configmap-local.yaml -kubectl create -f env-prod-db-configmap.yaml -kubectl create -f pv-local-reymota.yaml @@ -37,7 +37,7 @@ clean: -kubectl delete -f db-deployment.yaml -kubectl delete -f db-service.yaml - -kubectl delete -f env-prod-configmap.yaml + -kubectl delete -f env-prod-configmap-local.yaml -kubectl delete -f env-prod-db-configmap.yaml -kubectl delete -f postgres-data-persistentvolumeclaim.yaml diff --git a/ReyMotaAppsDj/K8S/env-prod-configmap-local.yaml b/ReyMotaAppsDj/K8S/env-prod-configmap-local.yaml new file mode 100644 index 0000000..9f117e5 --- /dev/null +++ b/ReyMotaAppsDj/K8S/env-prod-configmap-local.yaml @@ -0,0 +1,20 @@ +apiVersion: v1 +data: + DEBUG: "True" + ENTORNO: "Pruebas" + DJANGO_ALLOWED_HOSTS: "reymota.es vmcluster k8s-server localhost 127.0.0.1 [::1]" + CSRF_TRUSTED_ORIGINS: "https://reymota.es http://vmcluster" + SECRET_KEY: change_me + SQL_DATABASE: reymota + SQL_ENGINE: django.db.backends.postgresql + SQL_HOST: db + SQL_PASSWORD: Dsa-0213 + SQL_PORT: "5432" + SQL_USER: creylopez + DATABASE: postgres +kind: ConfigMap +metadata: + labels: + io.kompose.service: web-env-prod + name: env-prod + namespace: reymota diff --git a/ReyMotaAppsDj/K8S/env-prod-configmap.yaml b/ReyMotaAppsDj/K8S/env-prod-configmap.yaml index 9bbecd1..3ca1ba6 100644 --- a/ReyMotaAppsDj/K8S/env-prod-configmap.yaml +++ b/ReyMotaAppsDj/K8S/env-prod-configmap.yaml @@ -1,6 +1,7 @@ apiVersion: v1 data: DEBUG: "False" + ENTORNO: "Producción" DJANGO_ALLOWED_HOSTS: "reymota.es vmcluster k8s-server localhost 127.0.0.1 [::1]" CSRF_TRUSTED_ORIGINS: "https://reymota.es http://vmcluster" SECRET_KEY: change_me diff --git a/ReyMotaAppsDj/K8S/reymota-deployment.yaml b/ReyMotaAppsDj/K8S/reymota-deployment.yaml index d334954..5e83b03 100644 --- a/ReyMotaAppsDj/K8S/reymota-deployment.yaml +++ b/ReyMotaAppsDj/K8S/reymota-deployment.yaml @@ -42,7 +42,10 @@ spec: - name: VERSION value: "$IMG_VERSION" - name: ENVIRONMENT - value: "Producción" + valueFrom: + configMapKeyRef: + key: ENTORNO + name: env-prod - name: DEBUG valueFrom: configMapKeyRef: diff --git a/ReyMotaAppsDj/reymota/templates/_branding.html b/ReyMotaAppsDj/reymota/templates/_branding.html index 29ce214..95aaf7d 100644 --- a/ReyMotaAppsDj/reymota/templates/_branding.html +++ b/ReyMotaAppsDj/reymota/templates/_branding.html @@ -3,6 +3,12 @@ {% load filtros_de_entorno %}