Pārlūkot izejas kodu

Cambios en Makefile

Tino 3 mēneši atpakaļ
vecāks
revīzija
5e70fdc677
5 mainītis faili ar 21 papildinājumiem un 14 dzēšanām
  1. 1 1
      K8S/.current_version
  2. 1 1
      K8S/.version
  3. 15 8
      K8S/Makefile
  4. 1 1
      src/misfinanzas/settings.py
  5. 3 3
      src/requirements.txt

+ 1 - 1
K8S/.current_version

@@ -1 +1 @@
-alpine-4
+alpine-7

+ 1 - 1
K8S/.version

@@ -1 +1 @@
-alpine-5
+alpine-8

+ 15 - 8
K8S/Makefile

@@ -9,10 +9,17 @@ IMG_VERSION := $(shell cat $(VERSION_FILE) 2>/dev/null || echo "alpine-1")
 BUILT_VERSION := $(shell cat .current_version 2>/dev/null || echo "$(IMG_VERSION)")
 export IMG_VERSION
 
+help:
+	@echo ""
+	@echo "Comandos disponibles:"
+	@echo ""
+	@grep "^[[:lower:]]" Makefile | grep -v "^\." | grep "##" | awk -F':.*## ' '{printf "  \033[1m%-20s\033[0m %s\n", $$1, $$2}'
+	@echo ""
+
 # limpia todo
 all: imagen clean install
 
-imagen:
+imagen: ## Crea la imagen
 	@echo "Building image with version: $(IMG_VERSION)"
 	@# Store current version for other targets to use
 	@echo "$(IMG_VERSION)" > .current_version
@@ -21,10 +28,10 @@ imagen:
 	@echo "$(IMG_VERSION)" | sed 's/alpine-\([0-9]*\)/alpine-\1/' | awk -F'-' '{print "alpine-" $$2+1}' > $(VERSION_FILE)
 	@echo "Next version will be: $$(cat $(VERSION_FILE))"
 
-ns:
+ns: ## Crea el namespace
 	-cat namespace.yaml | sed -e "s/<NS>/${NAMESPACE}/" |kubectl create -f -
 
-install:
+install: ## Instala todo (meno las claims)
 	-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 -
@@ -33,7 +40,7 @@ install:
 	-cat finanzas-service.yaml | sed -e "s/<NS>/${NAMESPACE}/" | kubectl create -f -
 	-cat finanzas-ingress.yaml | sed -e "s/<NS>/${NAMESPACE}/" | kubectl create -f -
 
-clean:
+clean: ## Borra todo (meno las claims)
 
 	-cat finanzas-ingress.yaml | sed -e "s/<NS>/${NAMESPACE}/" | kubectl delete -f -
 
@@ -45,17 +52,17 @@ clean:
 	-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:
+borraclaims: ## Borra las claims
 	-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:
+claims: ## Crea las 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:
+app: ## Borra y vuelve a crear el deployment
 	-cat finanzas-deployment.yaml | sed -e "s/<NS>/${NAMESPACE}/" | sed -e "s/<TAG>/${BUILT_VERSION}/" | sed -e "s/<REGISTRO>/${REGISTRO}/" | kubectl delete -f -
 	-cat finanzas-deployment.yaml | sed -e "s/<NS>/${NAMESPACE}/" | sed -e "s/<TAG>/${BUILT_VERSION}/" | sed -e "s/<REGISTRO>/${REGISTRO}/" | kubectl create -f -
 
-db:
+db: ## Crea la base de datos en el cluster
 	-kubectl create -f finanzas-db.yaml

+ 1 - 1
src/misfinanzas/settings.py

@@ -36,7 +36,7 @@ DEBUG = os.environ.get('DEBUG', 'False') == 'True'
 ALLOWED_HOSTS = [".reymota.es", ".reymota.lab", "127.0.0.1", "localhost", "k8s-server", ".rancher.lab",".vmcluster.lab","192.168.1.202", "localhost", "127.0.0.1"]
 
 
-CSRF_TRUSTED_ORIGINS = ["https://*.reymota.es", "http://*.reymota.lab", "http://k8s-server", "http://*.rancher.lab","http://*.vmcluster.lab"]
+CSRF_TRUSTED_ORIGINS = ["https://*.reymota.es", "http://*.reymota.lab", "http://*.reymota.lab", "http://*.reymota.lab:30351", "http://k8s-server", "http://*.rancher.lab","http://*.vmcluster.lab"]
 
 # Application definition
 

+ 3 - 3
src/requirements.txt

@@ -1,14 +1,14 @@
 asgiref==3.11.1
-Django==6.0.3
+Django==6.0.4
 django-calculation==1.0.0
 djangorestframework==3.16.1
 flake8==7.3.0
 gunicorn==25.0.1
 mccabe==0.7.0
-numpy==2.4.2
+numpy
 packaging==26.0
 pandas==3.0.0
-pillow==12.1.1
+pillow==12.2.0
 psycopg==3.3.2
 psycopg-binary==3.3.2
 psycopg-pool==3.3.0