From 4beab3b687af9b8a61342f4d68435db37028271a Mon Sep 17 00:00:00 2001 From: Shahd Lala Date: Tue, 12 May 2026 11:18:29 +0200 Subject: [PATCH] feat: NCS-74 Frontend Deployment config files (#119) Co-authored-by: Copilot --------- Co-authored-by: shahdlala66 Reviewed-on: https://git.janis-eccarius.de/NowChess/GitOps/pulls/119 Co-authored-by: Shahd Lala Co-committed-by: Shahd Lala --- kargo-projects/nowchess/ncs-stage.yaml | 12 +++++ kargo-projects/nowchess/ncs-warehouse.yaml | 15 ++++++ nowchess/base/nowchess-rollouts.yaml | 58 ++++++++++++++++++++++ nowchess/base/nowchess-services.yaml | 24 +++++++++ nowchess/eu-central-1-prod/ingress.yaml | 7 +++ nowchess/eu-central-1-staging/ingress.yaml | 7 +++ 6 files changed, 123 insertions(+) diff --git a/kargo-projects/nowchess/ncs-stage.yaml b/kargo-projects/nowchess/ncs-stage.yaml index 58106d4..38d2650 100644 --- a/kargo-projects/nowchess/ncs-stage.yaml +++ b/kargo-projects/nowchess/ncs-stage.yaml @@ -57,6 +57,11 @@ spec: name: ws sources: direct: true + - origin: + kind: Warehouse + name: frontend + sources: + direct: true promotionTemplate: spec: steps: @@ -140,6 +145,13 @@ spec: direct: false stages: - staging + - origin: + kind: Warehouse + name: frontend + sources: + direct: false + stages: + - staging promotionTemplate: spec: steps: diff --git a/kargo-projects/nowchess/ncs-warehouse.yaml b/kargo-projects/nowchess/ncs-warehouse.yaml index 02673d8..51ba4aa 100644 --- a/kargo-projects/nowchess/ncs-warehouse.yaml +++ b/kargo-projects/nowchess/ncs-warehouse.yaml @@ -132,3 +132,18 @@ spec: imageSelectionStrategy: SemVer repoURL: ghcr.io/now-chess/now-chess-systems/ws strictSemvers: true +--- +apiVersion: kargo.akuity.io/v1alpha1 +kind: Warehouse +metadata: + name: frontend + namespace: nowchess-kargo +spec: + freightCreationPolicy: Automatic + interval: 5m0s + subscriptions: + - image: + discoveryLimit: 20 + imageSelectionStrategy: SemVer + repoURL: ghcr.io/now-chess/now-chess-systems/frontend + strictSemvers: true diff --git a/nowchess/base/nowchess-rollouts.yaml b/nowchess/base/nowchess-rollouts.yaml index e7ce6cb..0b6147a 100644 --- a/nowchess/base/nowchess-rollouts.yaml +++ b/nowchess/base/nowchess-rollouts.yaml @@ -665,3 +665,61 @@ spec: activeService: nowchess-ws-active previewService: nowchess-ws-preview autoPromotionEnabled: true +--- +apiVersion: argoproj.io/v1alpha1 +kind: Rollout +metadata: + name: nowchess-frontend + labels: + app: nowchess-ws +spec: + selector: + matchLabels: + app: nowchess-frontend + template: + metadata: + labels: + app: nowchess-frontend + spec: + imagePullSecrets: + - name: ghcr-pull-secret + containers: + - 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 + ports: + - containerPort: 80 + protocol: TCP + livenessProbe: + httpGet: + path: / + port: 80 + initialDelaySeconds: 10 + periodSeconds: 10 + readinessProbe: + httpGet: + path: / + port: 80 + initialDelaySeconds: 5 + periodSeconds: 5 + resources: + requests: + cpu: "10m" + memory: "64Mi" + limits: + cpu: "100m" + memory: "128Mi" + strategy: + blueGreen: + activeService: nowchess-frontend-active + previewService: nowchess-frontend-preview + autoPromotionEnabled: true diff --git a/nowchess/base/nowchess-services.yaml b/nowchess/base/nowchess-services.yaml index 96f5b7b..a260de0 100644 --- a/nowchess/base/nowchess-services.yaml +++ b/nowchess/base/nowchess-services.yaml @@ -223,3 +223,27 @@ spec: - protocol: TCP port: 8084 targetPort: 8084 +--- +apiVersion: v1 +kind: Service +metadata: + name: nowchess-frontend-active +spec: + selector: + app: nowchess-frontend + ports: + - protocol: TCP + port: 80 + targetPort: 80 +--- +apiVersion: v1 +kind: Service +metadata: + name: nowchess-frontend-preview +spec: + selector: + app: nowchess-frontend + ports: + - protocol: TCP + port: 80 + targetPort: 80 diff --git a/nowchess/eu-central-1-prod/ingress.yaml b/nowchess/eu-central-1-prod/ingress.yaml index 247bad6..47e8653 100644 --- a/nowchess/eu-central-1-prod/ingress.yaml +++ b/nowchess/eu-central-1-prod/ingress.yaml @@ -41,6 +41,13 @@ spec: name: nowchess-core-active port: number: 8080 + - path: / + pathType: Prefix + backend: + service: + name: nowchess-frontend-active + port: + number: 80 tls: - hosts: - nowchess.janis-eccarius.de diff --git a/nowchess/eu-central-1-staging/ingress.yaml b/nowchess/eu-central-1-staging/ingress.yaml index 9edbfa2..f454070 100644 --- a/nowchess/eu-central-1-staging/ingress.yaml +++ b/nowchess/eu-central-1-staging/ingress.yaml @@ -41,6 +41,13 @@ spec: name: nowchess-core-active port: number: 8080 + - path: / + pathType: Prefix + backend: + service: + name: nowchess-frontend-active + port: + number: 80 tls: - hosts: - st.nowchess.janis-eccarius.de