From 2f1956b8ecc01a7d23f772de403d73651f16609e Mon Sep 17 00:00:00 2001 From: Celestino Rey Date: Tue, 6 Aug 2024 15:04:34 +0200 Subject: [PATCH] Cambios para que se use el registry local --- LibrosPy/K8S/Makefile | 14 +++++++------- LibrosPy/K8S/libros-deployment.yaml | 3 +-- LibrosPy/servicios/Makefile | 6 ++---- LyricsPy/K8S/Makefile | 9 ++++++--- LyricsPy/K8S/lyrics-deployment.yaml | 4 +++- LyricsPy/servicios/Makefile | 4 ++-- RepostajesPy/K8S/Makefile | 12 ++++++------ RepostajesPy/K8S/repostajes-deployment.yaml | 4 +++- RepostajesPy/servicios/Makefile | 4 ++-- 9 files changed, 32 insertions(+), 28 deletions(-) diff --git a/LibrosPy/K8S/Makefile b/LibrosPy/K8S/Makefile index 7181609..e4af450 100644 --- a/LibrosPy/K8S/Makefile +++ b/LibrosPy/K8S/Makefile @@ -1,4 +1,4 @@ -export IMG_VERSION = 1.0 +export IMG_VERSION = 1.1 # limpia todo all: imagen clean install @@ -6,11 +6,11 @@ imagen: cd ../servicios; make install: - envsubst < libros-deployment.yaml |kubectl create -f - - kubectl create -f pv-local-libros.yaml - kubectl create -f libros-prod-persistentvolumeclaim.yaml + -envsubst < libros-deployment.yaml |kubectl create -f - + -kubectl create -f pv-local-libros.yaml + -kubectl create -f libros-prod-persistentvolumeclaim.yaml clean: - envsubst < libros-deployment.yaml |kubectl delete -f - - kubectl delete -f libros-prod-persistentvolumeclaim.yaml - kubectl delete -f pv-local-libros.yaml + -envsubst < libros-deployment.yaml |kubectl delete -f - + -kubectl delete -f libros-prod-persistentvolumeclaim.yaml + -kubectl delete -f pv-local-libros.yaml diff --git a/LibrosPy/K8S/libros-deployment.yaml b/LibrosPy/K8S/libros-deployment.yaml index dbb457c..effd5d0 100644 --- a/LibrosPy/K8S/libros-deployment.yaml +++ b/LibrosPy/K8S/libros-deployment.yaml @@ -37,8 +37,7 @@ spec: - 0.0.0.0:5000 - libros:create_app() name: librospy - #image: creylopez/libros:$IMG_VERSION - image: localhost:30342/libros:$IMG_VERSION + image: registry.reymota.es/libros:$IMG_VERSION env: - name: SALUDO_DEMO value: "Hola, mundo" diff --git a/LibrosPy/servicios/Makefile b/LibrosPy/servicios/Makefile index 4baa09b..5077d0e 100644 --- a/LibrosPy/servicios/Makefile +++ b/LibrosPy/servicios/Makefile @@ -2,7 +2,5 @@ install: echo "Creando imagen con version ${IMG_VERSION}" - #docker build --no-cache -t creylopez/libros:${IMG_VERSION} . - #docker push creylopez/libros:${IMG_VERSION} - docker build --no-cache -t localhost:30342/libros:${IMG_VERSION} . - docker push localhost:30342/libros:${IMG_VERSION} + docker build --no-cache -t registry.reymota.es/libros:${IMG_VERSION} . + docker push registry.reymota.es/libros:${IMG_VERSION} diff --git a/LyricsPy/K8S/Makefile b/LyricsPy/K8S/Makefile index f4d8858..90773d4 100644 --- a/LyricsPy/K8S/Makefile +++ b/LyricsPy/K8S/Makefile @@ -6,8 +6,11 @@ imagen: cd ../servicios; make install: - envsubst < lyrics-deployment.yaml |kubectl create -f - + -kubectl create -f pv-local-lyrics.yaml + -kubectl create -f lyrics-prod-persistentvolumeclaim.yaml + -envsubst < lyrics-deployment.yaml |kubectl create -f - clean: - envsubst < lyrics-deployment.yaml |kubectl delete -f - - + -envsubst < lyrics-deployment.yaml |kubectl delete -f - + -kubectl delete -f lyrics-prod-persistentvolumeclaim.yaml + -kubectl delete -f pv-local-lyrics.yaml diff --git a/LyricsPy/K8S/lyrics-deployment.yaml b/LyricsPy/K8S/lyrics-deployment.yaml index 9a6e572..b8e319d 100644 --- a/LyricsPy/K8S/lyrics-deployment.yaml +++ b/LyricsPy/K8S/lyrics-deployment.yaml @@ -36,7 +36,7 @@ spec: - --bind - 0.0.0.0:5000 - lyrics:create_app() - image: creylopez/lyrics:$IMG_VERSION + image: registry.reymota.es/lyrics:$IMG_VERSION name: lyrics ports: - containerPort: 5000 @@ -45,6 +45,8 @@ spec: volumeMounts: - mountPath: /lyrics/instance name: lyrics-prod + imagePullSecrets: + - name: myregistrykey restartPolicy: Always volumes: - name: lyrics-prod diff --git a/LyricsPy/servicios/Makefile b/LyricsPy/servicios/Makefile index 07e2b9c..26afba9 100644 --- a/LyricsPy/servicios/Makefile +++ b/LyricsPy/servicios/Makefile @@ -2,7 +2,7 @@ install: echo "Creando imagen con version ${IMG_VERSION}" - docker build --no-cache -t creylopez/lyrics:${IMG_VERSION} . - docker push creylopez/lyrics:${IMG_VERSION} + docker build --no-cache -t registry.reymota.es/lyrics:${IMG_VERSION} . + docker push registry.reymota.es/lyrics:${IMG_VERSION} diff --git a/RepostajesPy/K8S/Makefile b/RepostajesPy/K8S/Makefile index fd4252a..03fb933 100644 --- a/RepostajesPy/K8S/Makefile +++ b/RepostajesPy/K8S/Makefile @@ -6,11 +6,11 @@ imagen: cd ../servicios; make install: - envsubst < repostajes-deployment.yaml |kubectl create -f - - kubectl create -f pv-local-repostajes.yaml - kubectl create -f repostajes-prod-persistentvolumeclaim.yaml + -kubectl create -f pv-local-repostajes.yaml + -kubectl create -f repostajes-prod-persistentvolumeclaim.yaml + -envsubst < repostajes-deployment.yaml |kubectl create -f - clean: - envsubst < repostajes-deployment.yaml |kubectl delete -f - - kubectl delete -f repostajes-prod-persistentvolumeclaim.yaml - kubectl delete -f pv-local-repostajes.yaml + -envsubst < repostajes-deployment.yaml |kubectl delete -f - + -kubectl delete -f repostajes-prod-persistentvolumeclaim.yaml + -kubectl delete -f pv-local-repostajes.yaml diff --git a/RepostajesPy/K8S/repostajes-deployment.yaml b/RepostajesPy/K8S/repostajes-deployment.yaml index 93a9ad9..5063882 100644 --- a/RepostajesPy/K8S/repostajes-deployment.yaml +++ b/RepostajesPy/K8S/repostajes-deployment.yaml @@ -37,7 +37,7 @@ spec: - 0.0.0.0:5000 - repostajes:create_app() name: repostajespy - image: creylopez/repostajes:$IMG_VERSION + image: registry.reymota.es/repostajes:$IMG_VERSION env: - name: SALUDO_DEMO value: "Hola, mundo" @@ -50,6 +50,8 @@ spec: name: repostajespy-instance - mountPath: /repostajes/migrations name: repostajespy-migrations + imagePullSecrets: + - name: myregistrykey restartPolicy: Always volumes: - name: repostajespy-instance diff --git a/RepostajesPy/servicios/Makefile b/RepostajesPy/servicios/Makefile index 2de7478..c8f4e65 100644 --- a/RepostajesPy/servicios/Makefile +++ b/RepostajesPy/servicios/Makefile @@ -2,7 +2,7 @@ install: echo "Creando imagen con version ${IMG_VERSION}" - docker build --no-cache -t creylopez/repostajes:${IMG_VERSION} . - docker push creylopez/repostajes:${IMG_VERSION} + docker build --no-cache -t registry.reymota.es/repostajes:${IMG_VERSION} . + docker push registry.reymota.es/repostajes:${IMG_VERSION}