From 065eb4c72f792e6cce120d289ea39663f4803aa5 Mon Sep 17 00:00:00 2001 From: Daniel Noulet Date: Sun, 20 Sep 2026 17:20:40 +0200 Subject: [PATCH] chore: changing versions --- Makefile | 2 +- .../templates/rabbitmq-statefulset.yaml | 20 ++++++++++++++----- deploy/nginx/README.md | 13 ++++++------ deploy/nginx/goguess.urpi.be.conf | 2 +- rancher-install.txt => rancher-install.md | 0 5 files changed, 24 insertions(+), 13 deletions(-) rename rancher-install.txt => rancher-install.md (100%) diff --git a/Makefile b/Makefile index e4ee272..819d580 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,7 @@ HELM ?= helm HELM_CHART := deploy/helm/go-guess HELM_RELEASE ?= go-guess HELM_NAMESPACE ?= go-guess -KUBECONFIG ?= $(HOME)/.config/kubectl/rancher.urpi.local.yaml +KUBECONFIG ?= $(HOME)/.config/kubectl/rancher.urpi.be.yaml .PHONY: help dev db-up db-down migrate migrate-down seed backend frontend frontend-install test test-backend test-frontend test-integration test-bdd test-bdd-down test-env test-env-down lint build rancher-storage helm-lint helm-deploy-development helm-deploy-production diff --git a/deploy/helm/go-guess/templates/rabbitmq-statefulset.yaml b/deploy/helm/go-guess/templates/rabbitmq-statefulset.yaml index 256331b..52b4716 100644 --- a/deploy/helm/go-guess/templates/rabbitmq-statefulset.yaml +++ b/deploy/helm/go-guess/templates/rabbitmq-statefulset.yaml @@ -46,23 +46,33 @@ spec: - name: amqp containerPort: 5672 readinessProbe: + exec: + command: + - rabbitmq-diagnostics + - -q + - ping + periodSeconds: 10 + timeoutSeconds: 10 + failureThreshold: 6 + startupProbe: exec: command: - rabbitmq-diagnostics - -q - ping initialDelaySeconds: 10 - periodSeconds: 5 - timeoutSeconds: 5 + periodSeconds: 10 + timeoutSeconds: 10 + failureThreshold: 30 livenessProbe: exec: command: - rabbitmq-diagnostics - -q - ping - initialDelaySeconds: 30 - periodSeconds: 10 - timeoutSeconds: 5 + periodSeconds: 20 + timeoutSeconds: 10 + failureThreshold: 3 resources: {{- toYaml .Values.rabbitmq.resources | nindent 12 }} volumeMounts: diff --git a/deploy/nginx/README.md b/deploy/nginx/README.md index 518d8f4..46b59a2 100644 --- a/deploy/nginx/README.md +++ b/deploy/nginx/README.md @@ -18,8 +18,10 @@ to return the dedicated server address before requesting a certificate. ## Nginx and Certbot -The included virtual host assumes Nginx runs on the Kubernetes node and can -reach the NodePort at `127.0.0.1:31374`. +The included virtual host assumes Rancher runs in Docker on the Nginx server. +It reaches the embedded K3s NodePort through Rancher's Docker bridge address, +`172.17.0.2:31374`. Confirm that address with `docker inspect rancher` before +installing the configuration. ```bash sudo install -m 0644 deploy/nginx/goguess.urpi.be.conf \ @@ -35,9 +37,8 @@ sudo certbot renew --dry-run Certbot adds the HTTPS listener, certificate paths, and HTTP-to-HTTPS redirect to this virtual host. Allow inbound TCP ports `80` and `443`. Do not expose NodePort `31374`, PostgreSQL `5432`, RabbitMQ `5672`, or RabbitMQ management -ports to the public internet. If Nginx is not on a Kubernetes node, replace -`127.0.0.1` in `proxy_pass` with a private cluster-node address and allow -`31374` only from the Nginx server. +ports to the public internet. If Rancher uses a different Docker address, +replace `172.17.0.2` in `proxy_pass` with the current Rancher container address. ## Deploy and verify @@ -47,7 +48,7 @@ Deploy the production profile: make helm-deploy-production kubectl -n go-guess-production get pods kubectl -n go-guess-production get service go-guess -curl --fail http://127.0.0.1:31374/api/health +curl --fail http://172.17.0.2:31374/api/health curl --fail https://goguess.urpi.be/api/health ``` diff --git a/deploy/nginx/goguess.urpi.be.conf b/deploy/nginx/goguess.urpi.be.conf index 5101736..40ec789 100644 --- a/deploy/nginx/goguess.urpi.be.conf +++ b/deploy/nginx/goguess.urpi.be.conf @@ -6,7 +6,7 @@ server { client_max_body_size 10m; location / { - proxy_pass http://127.0.0.1:31374; + proxy_pass http://172.17.0.2:31374; proxy_http_version 1.1; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; diff --git a/rancher-install.txt b/rancher-install.md similarity index 100% rename from rancher-install.txt rename to rancher-install.md