From 6cef31d142ad1713334afcef8c71bd13a0cc8493 Mon Sep 17 00:00:00 2001 From: LQ63 Date: Wed, 17 Jun 2026 02:04:26 +0200 Subject: [PATCH] feat: wire official-bots to external tournament server MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds the env vars and secret structure needed for the official-bots pod to connect to the external tournament server at 141.37.123.132:8086. - TOURNAMENT_SERVER_URL and TOURNAMENT_BOT_DIFFICULTY added as plain env vars to the nowchess-official-bots rollout - TOURNAMENT_BOT_TOKEN wired from a new ncs-tournament-secret SealedSecret - Placeholder SealedSecret files added for staging, eu-central-1-prod, and htwg-1-prod — must be sealed with a real bot token before deploying TOURNAMENT_ID is intentionally omitted; it is per-tournament and supplied at runtime via POST /api/bots/official/join-tournament. Co-Authored-By: Claude Sonnet 4.6 --- nowchess/base/nowchess-rollouts.yaml | 9 +++++++++ secrets/kustomization.yaml | 2 ++ .../eu-central-1-prod/ncs-tournament-secret.yaml | 16 ++++++++++++++++ .../htwg-1-prod/ncs-tournament-secret.yaml | 16 ++++++++++++++++ .../nowchess/staging/ncs-tournament-secret.yaml | 16 ++++++++++++++++ 5 files changed, 59 insertions(+) create mode 100644 secrets/nowchess/eu-central-1-prod/ncs-tournament-secret.yaml create mode 100644 secrets/nowchess/htwg-1-prod/ncs-tournament-secret.yaml create mode 100644 secrets/nowchess/staging/ncs-tournament-secret.yaml diff --git a/nowchess/base/nowchess-rollouts.yaml b/nowchess/base/nowchess-rollouts.yaml index 11baa8b..41d5abf 100755 --- a/nowchess/base/nowchess-rollouts.yaml +++ b/nowchess/base/nowchess-rollouts.yaml @@ -441,6 +441,15 @@ spec: key: INTERNAL_SECRET - name: ACCOUNT_SERVICE_URL value: http://nowchess-account:8083 + - name: TOURNAMENT_SERVER_URL + value: "http://141.37.123.132:8086" + - name: TOURNAMENT_BOT_DIFFICULTY + value: "medium" + - name: TOURNAMENT_BOT_TOKEN + valueFrom: + secretKeyRef: + name: ncs-tournament-secret + key: TOURNAMENT_BOT_TOKEN ports: - containerPort: 8088 protocol: TCP diff --git a/secrets/kustomization.yaml b/secrets/kustomization.yaml index b0086de..50247be 100755 --- a/secrets/kustomization.yaml +++ b/secrets/kustomization.yaml @@ -11,10 +11,12 @@ resources: - nowchess/staging/ncs-jwt-keys.yaml - nowchess/staging/ncs-db-secrets.yaml - nowchess/staging/ncs-internal-secret.yaml + - nowchess/staging/ncs-tournament-secret.yaml - nowchess/eu-central-1-prod/ghcr-pull-secret.yaml - nowchess/eu-central-1-prod/ncs-jwt-keys.yaml - nowchess/eu-central-1-prod/ncs-db-secrets.yaml - nowchess/eu-central-1-prod/ncs-internal-secret.yaml + - nowchess/eu-central-1-prod/ncs-tournament-secret.yaml - nowchess/kargo/ghcr-image-secret.yaml - nowchess/kargo/github-image-secret.yaml - nowchess/kargo/remotek6-certs.yaml diff --git a/secrets/nowchess/eu-central-1-prod/ncs-tournament-secret.yaml b/secrets/nowchess/eu-central-1-prod/ncs-tournament-secret.yaml new file mode 100644 index 0000000..a07227c --- /dev/null +++ b/secrets/nowchess/eu-central-1-prod/ncs-tournament-secret.yaml @@ -0,0 +1,16 @@ +# PLACEHOLDER — seal with eu-central-1 cluster key before use: +# kubectl -n nowchess create secret generic ncs-tournament-secret \ +# --from-literal=TOURNAMENT_BOT_TOKEN= \ +# --dry-run=client -o yaml | kubeseal --controller-namespace kube-system -o yaml > this-file.yaml +apiVersion: bitnami.com/v1alpha1 +kind: SealedSecret +metadata: + name: ncs-tournament-secret + namespace: nowchess +spec: + encryptedData: + REPLACE_KEY: REPLACE_WITH_SEALED_VALUE + template: + metadata: + name: ncs-tournament-secret + namespace: nowchess diff --git a/secrets/nowchess/htwg-1-prod/ncs-tournament-secret.yaml b/secrets/nowchess/htwg-1-prod/ncs-tournament-secret.yaml new file mode 100644 index 0000000..579452c --- /dev/null +++ b/secrets/nowchess/htwg-1-prod/ncs-tournament-secret.yaml @@ -0,0 +1,16 @@ +# PLACEHOLDER — seal with htwg-1 cluster key before use: +# kubectl -n nowchess create secret generic ncs-tournament-secret \ +# --from-literal=TOURNAMENT_BOT_TOKEN= \ +# --dry-run=client -o yaml | kubeseal --controller-namespace kube-system -o yaml > this-file.yaml +apiVersion: bitnami.com/v1alpha1 +kind: SealedSecret +metadata: + name: ncs-tournament-secret + namespace: nowchess +spec: + encryptedData: + REPLACE_KEY: REPLACE_WITH_SEALED_VALUE + template: + metadata: + name: ncs-tournament-secret + namespace: nowchess diff --git a/secrets/nowchess/staging/ncs-tournament-secret.yaml b/secrets/nowchess/staging/ncs-tournament-secret.yaml new file mode 100644 index 0000000..94d5778 --- /dev/null +++ b/secrets/nowchess/staging/ncs-tournament-secret.yaml @@ -0,0 +1,16 @@ +# PLACEHOLDER — seal with staging cluster key before use: +# kubectl -n nowchess create secret generic ncs-tournament-secret \ +# --from-literal=TOURNAMENT_BOT_TOKEN= \ +# --dry-run=client -o yaml | kubeseal --controller-namespace kube-system -o yaml > this-file.yaml +apiVersion: bitnami.com/v1alpha1 +kind: SealedSecret +metadata: + name: ncs-tournament-secret + namespace: nowchess +spec: + encryptedData: + REPLACE_KEY: REPLACE_WITH_SEALED_VALUE + template: + metadata: + name: ncs-tournament-secret + namespace: nowchess