Commit Graph

578 Commits

Author SHA1 Message Date
svc.kargo cef7823b44 chore(kargo): update image tag frontend to 0.4.2 on staging (#418) 2026-06-17 11:22:48 +02:00
Janis f655ce8ac6 fix(official-bots): resolve JWT verify key via MP env props (#417)
Reviewed-on: #417
2026-06-17 10:18:58 +02:00
Janis 93df9ee8d3 fix(official-bots): resolve JWT verify key via MP env props (#416)
The merged rollout set JWT_PUBLIC_KEY_PATH, but the running image's
config never references it, so mp.jwt.verify.publickey.location stayed
null and every token failed with "Verification key is unresolvable".

Replace it with the MicroProfile properties the runtime reads directly
(MP_JWT_VERIFY_PUBLICKEY_LOCATION, MP_JWT_VERIFY_ISSUER), pointing at the
already-mounted ncs-jwt-keys public key. No image rebuild needed.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

Reviewed-on: #416
2026-06-17 10:01:38 +02:00
Janis 4563782626 fix(official-bots): mount JWT public key from ncs-jwt-keys (#414)
Reviewed-on: #414
2026-06-17 09:51:15 +02:00
Janis 2d5047cc63 fix(official-bots): mount JWT public key from ncs-jwt-keys (#413)
The official-bots rollout never mounted the ncs-jwt-keys secret nor set
JWT_PUBLIC_KEY_PATH, so the service fell back to the image-baked
public.pem, which does not match the deployed signing key. Every token
failed RS256 verification -> 401.

Mount ncs-jwt-keys at /secrets/jwt and point JWT_PUBLIC_KEY_PATH there,
mirroring account/core/tournament. Verify-only, no private key.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

Reviewed-on: #413
2026-06-17 09:43:05 +02:00
svc.kargo 669159b098 chore(kargo): update image tag frontend to 0.4.1 on eu-central-1-prod (#412) 2026-06-17 09:39:33 +02:00
svc.kargo 55bcbe8ee9 chore(kargo): update image tag account to 0.25.0 on eu-central-1-prod (#411) 2026-06-17 09:38:50 +02:00
svc.kargo 5d77b37f57 chore(kargo): update image tag frontend to 0.4.1-x86_v2 on htwg-1-prod (#410) 2026-06-17 09:38:03 +02:00
svc.kargo f11b96a387 chore(kargo): update image tag account to 0.25.0-x86_v2 on htwg-1-prod (#409) 2026-06-17 09:37:57 +02:00
svc.kargo 6b2c67bd77 chore(kargo): update image tag official-bots to 0.19.0 on eu-central-1-prod (#408) 2026-06-17 09:37:51 +02:00
svc.kargo 4850303432 chore(kargo): update image tag official-bots to 0.19.0-x86_v2 on htwg-1-prod (#407) 2026-06-17 09:37:50 +02:00
svc.kargo 793b92e1e3 chore(kargo): update image tag official-bots to 0.19.0 on staging (#406) 2026-06-17 09:33:57 +02:00
svc.kargo b8b7d5aa47 chore(kargo): update image tag account to 0.25.0 on staging (#405) 2026-06-17 09:33:26 +02:00
svc.kargo 79dc37ffb5 chore(kargo): update image tag frontend to 0.4.1 on staging (#404) 2026-06-17 09:22:11 +02:00
Janis dbf9a551a7 fix(ingress): route /api/bots to official-bots service (#403)
/api/bots/official/join-tournament returned 404 because no ingress
rule matched the prefix; requests fell through to the /api catch-all
and hit nowchess-core (8080), which has no such endpoint.

Add /api/bots Prefix rule -> nowchess-official-bots-active:8088 in
all three environments (staging, eu-central-1-prod, htwg-1-prod).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

Reviewed-on: #403
2026-06-17 08:58:49 +02:00
Janis 06e70a5e8a feat(spark): add staging overlay, scale down prod
- spark-cluster/eu-central-1-staging: namespace nowchess-staging, ingress
  patched to spark-st.* / spark-history-st.* with TLS + cert-manager
- spark-analytics/eu-central-1-staging: namespace nowchess-staging, image
  pinned to 0.2.0, all CronJob + live-dashboard patches carried over
- eu-central-1/argo-apps: spark-cluster-staging + spark-analytics-staging
  ArgoCD apps pointing at new staging overlays
- spark-cluster/eu-central-1-prod: scale spark-master and spark-worker to 0

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-17 08:48:31 +02:00
svc.kargo f38fd0302c chore(kargo): update image tag frontend to 0.4.0 on staging (#402) 2026-06-17 08:24:42 +02:00
Janis Eccarius 95dc346064 fix(spark): use file:/// so driver serves analytics.jar to executors over HTTP 2026-06-17 01:33:13 +02:00
Janis Eccarius fe75a75a2e fix(spark): add headless Services + driver.host/port so executors can reach driver pods 2026-06-17 01:29:35 +02:00
Janis Eccarius 27920182cb fix(spark): raise executor.memory to 512m - JVM minimum heap is 471m 2026-06-17 01:23:25 +02:00
Janis Eccarius 0dbfd4d35c fix(spark): raise worker memory to 512m/1Gi to fit executor overhead 2026-06-17 01:20:59 +02:00
Janis Eccarius a0f96e9985 fix(spark): raise driver.memory to 512m - Spark 4.x minimum is 450m 2026-06-17 01:20:31 +02:00
Janis Eccarius 54e0561b43 fix(spark): fit executor within 256m worker - instances=1, memory=200m, driver=256m 2026-06-17 01:17:17 +02:00
Janis Eccarius 7eecc23510 chore(spark): minimal cluster - 1 master + 1 worker, reduced limits, no streaming 2026-06-17 01:09:36 +02:00
Janis Eccarius d34a78c921 chore(spark): scale down all Spark workloads to free cluster resources 2026-06-17 01:05:30 +02:00
Janis Eccarius 0070139a37 fix(spark): reduce worker cores to 2 per worker (4 total) 2026-06-17 00:47:51 +02:00
Janis Eccarius 1b75466b3e fix(spark): cap executor cores to prevent job starvation
Spark standalone gives executors all worker cores by default.
LiveDashboard was consuming all 8 cores (2 workers x 4 cores).
- streaming: spark.executor.cores=1 (uses 1 core total)
- batch jobs: spark.executor.cores=2 (uses 4 cores total, 2 per executor)
Leaves headroom for concurrent streaming + batch.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-17 00:44:16 +02:00
Janis Eccarius d3feb65eb3 fix(spark): increase worker cores to 4 to allow concurrent jobs
With SPARK_WORKER_CORES=1 and 2 workers the cluster has 2 total cores.
LiveDashboard holds both — batch jobs wait indefinitely. 4 cores per
worker gives 8 total, enough to run streaming + batch concurrently.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-17 00:41:49 +02:00
Janis Eccarius 906a8cda2c fix(sealed-secrets): migrate Helm repo URL to bitnami
bitnami-labs GitHub Pages repo (bitnami-labs.github.io/sealed-secrets)
returns 404 — chart moved to charts.bitnami.com/bitnami. Updates chart
version from 2.16.1 to 2.5.19 (controller 0.27.1 → 0.31.0). Controller
is backward-compatible with existing sealed secrets.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-17 00:40:23 +02:00
Janis Eccarius e9926cbf62 chore(argocd): re-enable auto-sync for Spark apps
Cluster stable. Re-enabling automated sync on spark-analytics and
spark-cluster. Driver DNS fix and Recreate strategy already in main,
so next sync deploys the corrected manifests.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-17 00:35:33 +02:00
svc.kargo f043443efd chore(kargo): update image tag analysis to 0.2.0 on eu-central-1-prod (#400) 2026-06-17 00:27:23 +02:00
Janis Eccarius f6274857d0 fix(redis): allow corrupt AOF tail on startup after CPU incident
CPU saturation caused an unclean AOF write, corrupting the tail of
appendonly.aof.41.incr.aof at offset 32653224. Redis refuses to start.
Setting aof-load-corrupt-tail-max-size to 88 (value Redis reported) so
it truncates and loads the intact data instead of crash-looping.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-17 00:20:19 +02:00
Janis Eccarius 423f5aa497 chore(argocd): disable auto-sync for both Spark apps
Cluster saturated at 100% CPU due to Spark executor crash loop.
Disabling automated sync on spark-analytics and spark-cluster to prevent
further changes until cluster is stable.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-17 00:08:01 +02:00
Janis Eccarius 081d7807c3 fix(spark): use Recreate strategy to avoid RWO PVC deadlock
Rolling update deadlocked: new pod couldn't attach the RWO checkpoint
PVC while the old pod still held it, so ContainerCreating stalled for
39+ minutes. Recreate terminates the old pod first.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-17 00:04:45 +02:00
Janis Eccarius 23f814ae29 fix(spark): add headless service so executors can reach driver
Spark executors crashed immediately (exit 1) because the driver
advertised its pod name as the RPC hostname, which is not DNS-resolvable
in-cluster. Added headless Service `spark-live-dashboard-driver` and
pinned spark.driver.host/port + spark.blockManager.port so workers can
connect back to the driver. Stops the JVM fork storm that saturated all
three nodes at ~100% CPU.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-17 00:03:06 +02:00
Janis Eccarius cb9de632d9 fix(spark): drop driver pod requests to 50m CPU / 64Mi memory
Nodes have only ~60-210Mi free. Requests are scheduler hints only —
pods burst to 1Gi limit once placed. 64Mi fits on all three nodes.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-16 23:21:11 +02:00
svc.kargo dfa7749c18 chore(kargo): update image tag tournament to 0.3.0 on eu-central-1-prod (#399) 2026-06-16 22:57:57 +02:00
Janis Eccarius 342e1f60b3 fix(spark): lower driver pod requests to 100m CPU / 256Mi memory
Nodes are saturated on requested resources. Driver pods (streaming +
cronjobs) were requesting 500m CPU + 768Mi each. Limits unchanged at
1 CPU / 1Gi — pods can still burst when resources are free.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-16 22:47:51 +02:00
Janis Eccarius 0b69b04b1c fix(spark): add fsGroup 185 so spark user can write to PVCs
local-path PVCs are created root-owned. The apache/spark image runs as
spark (UID 185). fsGroup: 185 makes K8s chown the mounted volume to that
group on attach, fixing the mkdir IOException on /spark-checkpoint.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-16 22:22:50 +02:00
Janis Eccarius 8ca3ed4643 fix: updated analytics 2026-06-16 22:08:42 +02:00
svc.kargo f90777ec63 chore(kargo): update image tag tournament to 0.3.0-x86_v2 on htwg-1-prod (#398) 2026-06-16 21:57:55 +02:00
svc.kargo b354cb1594 chore(kargo): update image tag official-bots to 0.18.0-x86_v2 on htwg-1-prod (#396) 2026-06-16 21:57:42 +02:00
svc.kargo 7f17905b68 chore(kargo): update image tag analysis to 0.2.0 on staging (#395) 2026-06-16 21:53:37 +02:00
svc.kargo 7b95f16361 chore(kargo): update image tag official-bots to 0.18.0 on staging (#394) 2026-06-16 21:52:58 +02:00
svc.kargo e61cf790b1 chore(kargo): update image tag tournament to 0.3.0 on staging (#393) 2026-06-16 21:49:31 +02:00
Janis Eccarius e08e8313ff fix(spark): use nginx ingress class instead of traefik
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-16 20:42:14 +02:00
Janis Eccarius ab95b4f101 fix(spark): replace shared spark-events PVC with emptyDir to fix Multi-Attach error
local-path provisioner is RWO-only; attaching a single PVC to master, two
workers, history-server, and streaming pod on separate nodes causes
Multi-Attach errors. Each pod now gets its own ephemeral emptyDir for
/spark-events. Event logging confs removed from CronJobs and streaming
Deployment (logs are pod-local and do not persist across restarts).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-16 20:33:48 +02:00
Janis Eccarius e20bedbff5 fix(spark): disable service link env vars on master pod
K8s injects SPARK_MASTER_PORT=tcp://<ip>:7077 because the Service is
named spark-master. Spark master parses it as integer -> NumberFormatException.
enableServiceLinks: false suppresses all Docker-link style env var injection.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-16 20:14:37 +02:00
Janis Eccarius aa8d04a1cc fix(spark): upgrade image to apache/spark:4.0.3-scala2.13-java17-ubuntu
3.5.x has no official Docker Hub image. 4.0.3 is the oldest available
scala2.13 variant on Docker Hub.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-16 20:11:38 +02:00
Janis Eccarius 710e2ec308 fix(spark): lower memory requests to fix scheduling on resource-constrained nodes
Scheduler uses requests (not limits) for placement. Previous 1Gi requests
per pod caused Insufficient memory even with plenty of physical RAM.
New requests: master 256Mi, workers 256Mi, history-server 128Mi.
Limits unchanged. SPARK_WORKER_MEMORY reduced to 512m to match worker budget.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-16 20:02:02 +02:00