From f01a38a7e25b5ac7205e395dae5e8fb4db961f5b Mon Sep 17 00:00:00 2001 From: Janis Date: Tue, 19 May 2026 09:18:02 +0200 Subject: [PATCH] feat(nowchess): add frontend environment configuration and update rollouts to use ConfigMap --- nowchess/base/kustomization.yaml | 1 + nowchess/base/nowchess-frontend-env-config.yaml | 7 +++++++ nowchess/base/nowchess-rollouts.yaml | 12 +++--------- nowchess/eu-central-1-prod/kustomization.yaml | 11 +++++++++++ 4 files changed, 22 insertions(+), 9 deletions(-) create mode 100644 nowchess/base/nowchess-frontend-env-config.yaml diff --git a/nowchess/base/kustomization.yaml b/nowchess/base/kustomization.yaml index 80a7a70..d41fb21 100644 --- a/nowchess/base/kustomization.yaml +++ b/nowchess/base/kustomization.yaml @@ -5,6 +5,7 @@ resources: - nowchess-rollouts.yaml - nowchess-services.yaml - nowchess-env-config.yaml + - nowchess-frontend-env-config.yaml - nowchess-hpa.yaml configurations: diff --git a/nowchess/base/nowchess-frontend-env-config.yaml b/nowchess/base/nowchess-frontend-env-config.yaml new file mode 100644 index 0000000..a7e1cb8 --- /dev/null +++ b/nowchess/base/nowchess-frontend-env-config.yaml @@ -0,0 +1,7 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: nowchess-frontend-env-config +data: + API_URL: "https://st.nowchess.janis-eccarius.de" + WEBSOCKET_URL: "wss://st.nowchess.janis-eccarius.de" diff --git a/nowchess/base/nowchess-rollouts.yaml b/nowchess/base/nowchess-rollouts.yaml index a17aa77..408af22 100644 --- a/nowchess/base/nowchess-rollouts.yaml +++ b/nowchess/base/nowchess-rollouts.yaml @@ -703,15 +703,9 @@ spec: - name: nowchess-frontend image: ghcr.io/now-chess/now-chess-systems/frontend:latest imagePullPolicy: Always - env: - - name: REACT_APP_API_URL - value: http://nowchess-core-active:8080 - - name: REACT_APP_ACCOUNT_URL - value: http://nowchess-account-active:8083 - - name: REACT_APP_STORE_URL - value: http://nowchess-store-active:8085 - - name: REACT_APP_WS_URL - value: http://nowchess-ws-active:8084 + envFrom: + - configMapRef: + name: nowchess-frontend-env-config ports: - containerPort: 80 protocol: TCP diff --git a/nowchess/eu-central-1-prod/kustomization.yaml b/nowchess/eu-central-1-prod/kustomization.yaml index 3036064..d1380a8 100644 --- a/nowchess/eu-central-1-prod/kustomization.yaml +++ b/nowchess/eu-central-1-prod/kustomization.yaml @@ -20,6 +20,17 @@ patches: target: kind: ConfigMap name: nowchess-env-config +- patch: |- + apiVersion: v1 + kind: ConfigMap + metadata: + name: nowchess-frontend-env-config + data: + API_URL: "https://nowchess.janis-eccarius.de" + WEBSOCKET_URL: "wss://nowchess.janis-eccarius.de" + target: + kind: ConfigMap + name: nowchess-frontend-env-config images: - name: ghcr.io/now-chess/now-chess-systems/account newTag: 0.16.0