Browse Source

Pongo en config si es versión de pruebas o producción y lo reflejo en el branding

politica
Celestino Rey 1 year ago
parent
commit
9f411206a7
12 changed files with 73 additions and 13 deletions
  1. +1
    -1
      JugarAlPadel/K8S/Makefile
  2. +3
    -3
      JugarAlPadel/K8S/Makefile.local
  3. +20
    -0
      JugarAlPadel/K8S/env-prod-configmap-local.yaml
  4. +1
    -0
      JugarAlPadel/K8S/env-prod-configmap.yaml
  5. +4
    -1
      JugarAlPadel/K8S/jugaralpadel-deployment.yaml
  6. +7
    -1
      JugarAlPadel/gestion_reservas/templates/_branding.html
  7. +1
    -1
      ReyMotaAppsDj/K8S/Makefile
  8. +3
    -3
      ReyMotaAppsDj/K8S/Makefile.local
  9. +20
    -0
      ReyMotaAppsDj/K8S/env-prod-configmap-local.yaml
  10. +1
    -0
      ReyMotaAppsDj/K8S/env-prod-configmap.yaml
  11. +4
    -1
      ReyMotaAppsDj/K8S/reymota-deployment.yaml
  12. +8
    -2
      ReyMotaAppsDj/reymota/templates/_branding.html

+ 1
- 1
JugarAlPadel/K8S/Makefile View File

@ -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


+ 3
- 3
JugarAlPadel/K8S/Makefile.local View File

@ -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


+ 20
- 0
JugarAlPadel/K8S/env-prod-configmap-local.yaml View File

@ -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

+ 1
- 0
JugarAlPadel/K8S/env-prod-configmap.yaml View File

@ -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


+ 4
- 1
JugarAlPadel/K8S/jugaralpadel-deployment.yaml View File

@ -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:


+ 7
- 1
JugarAlPadel/gestion_reservas/templates/_branding.html View File

@ -3,6 +3,12 @@
{% load filtros_de_entorno %}
<div class="app-branding">
<a class="app-logo" href="{% url 'eventos:lista_eventos' %}"><img class="logo-icon me-2" src="{% static 'images/palapadel.svg' %}" alt="logo"><span class="logo-text">JUGAR AL PADEL</span><span style="color: blue; font-size: 14px;"> v {{ "VERSION"|muestra_version }}</span></a>
<a class="app-logo" href="{% url 'eventos:lista_eventos' %}"><img class="logo-icon me-2" src="{% static 'images/palapadel.svg' %}" alt="logo"><span class="logo-text">JUGAR AL PADEL</span><span style="color: blue; font-size: 14px;">
{% if 'ENVIRONMENT'|muestra_version == 'Pruebas' %}
p
{% else %}
v
{% endif %}
{{ "VERSION"|muestra_version }}</span></a>
</div><!--//app-branding-->

+ 1
- 1
ReyMotaAppsDj/K8S/Makefile View File

@ -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


+ 3
- 3
ReyMotaAppsDj/K8S/Makefile.local View File

@ -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


+ 20
- 0
ReyMotaAppsDj/K8S/env-prod-configmap-local.yaml View File

@ -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

+ 1
- 0
ReyMotaAppsDj/K8S/env-prod-configmap.yaml View File

@ -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


+ 4
- 1
ReyMotaAppsDj/K8S/reymota-deployment.yaml View File

@ -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:


+ 8
- 2
ReyMotaAppsDj/reymota/templates/_branding.html View File

@ -3,6 +3,12 @@
{% load filtros_de_entorno %}
<div class="app-branding">
<a class="app-logo" href="{% url 'principal' %}"><img class="logo-icon me-2" src="{% static 'images/reymota-logo.svg' %}" alt="logo"><span class="logo-text">REYMOTA</span><span style="color: blue; font-size: 14px;"> v {{ "VERSION"|muestra_version }}</span></a>
<a class="app-logo" href="{% url 'principal' %}"><img class="logo-icon me-2" src="{% static 'images/reymota-logo.svg' %}" alt="logo"><span class="logo-text">REYMOTA</span>
<span style="color: blue; font-size: 14px;">
{% if 'ENVIRONMENT'|muestra_version == 'Pruebas' %}
p
{% else %}
v
{% endif %}
{{ "VERSION"|muestra_version }}</span></a>
</div><!--//app-branding-->

Loading…
Cancel
Save