Commit Graph

565 Commits

Author SHA1 Message Date
Janis f0dc9fd145 chore(official-bots): debug logging for JWT verify on staging
Delete PR Branch On Close / delete-branch (pull_request) Successful in 6s
Enable DEBUG for io.smallrye.jwt and io.quarkus.security on the
official-bots rollout in staging only (container env, not the shared
ConfigMap) to diagnose the persistent 401. Remove after root cause.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-17 09:50:04 +02:00
Janis cfb25eff8c fix(official-bots): mount JWT public key from ncs-jwt-keys
Delete PR Branch On Close / delete-branch (pull_request) Successful in 6s
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>
2026-06-17 09:42:21 +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
Janis Eccarius 25f230fd18 chore(spark): integrate upstream main into spark-analytics branch 2026-06-16 19:58:26 +02:00
Janis Eccarius d962dfda22 feat(spark): replace Bitnami chart with Apache Spark manifests
Bitnami Spark chart requires a Broadcom commercial license. Replace with
plain Deployments using apache/spark:3.5.4-scala2.13-java17-ubuntu
(Apache 2.0, same image used by the analytics jobs):
- spark-master: Deployment + ClusterIP Service (ports 7077/8080)
- spark-worker: Deployment, 2 replicas, connects to spark-master:7077
- spark-history-server: updated to apache/spark image
Ingress backend corrected to spark-master:8080.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-16 19:48:51 +02:00
Janis 63e9d0512c feat(nci-11): add Kubernetes manifests for nowchess-analysis service (#392)
Co-authored-by: Janis Eccarius <eccariusjanis@gmail.com>
Reviewed-on: #392
2026-06-16 19:42:04 +02:00
svc.kargo 0442352b3e chore(kargo): update image tag frontend to 0.3.0 on eu-central-1-prod (#391) 2026-06-16 10:37:05 +02:00
svc.kargo 44b3369501 chore(kargo): update image tag tournament to 0.2.0 on eu-central-1-prod (#390) 2026-06-16 10:36:25 +02:00
svc.kargo fd62f236fa chore(kargo): update image tag core to 0.51.0 on eu-central-1-prod (#389) 2026-06-16 10:35:46 +02:00
svc.kargo d0d4370c50 chore(kargo): update image tag tournament to 0.2.0-x86_v2 on htwg-1-prod (#388) 2026-06-16 10:35:25 +02:00
svc.kargo 1dd1cacbb4 chore(kargo): update image tag core to 0.51.0-x86_v2 on htwg-1-prod (#387) 2026-06-16 10:35:20 +02:00
svc.kargo 1a3403a48e chore(kargo): update image tag analysis to 0.2.0-x86_v2 on htwg-1-prod (#386) 2026-06-16 10:35:12 +02:00
svc.kargo 9b906edfc9 chore(kargo): update image tag analysis to 0.2.0 on eu-central-1-prod (#385) 2026-06-16 10:35:05 +02:00
svc.kargo d6a05d2e1e chore(kargo): update image tag frontend to 0.3.0-x86_v2 on htwg-1-prod (#384) 2026-06-16 10:35:04 +02:00
svc.kargo 0bb5aabf98 chore(kargo): update image tag analysis to 0.2.0 on staging (#383) 2026-06-15 23:01:39 +02:00
Janis Eccarius cdfec30284 feat(spark): add Spark History Server Deployment and Service
The Bitnami spark chart 9.2.10 does not render a history server despite
historyServer.enabled=true in values. Add an explicit Deployment and
ClusterIP Service (spark-history-server-svc:18080) using the same
bitnami/spark:3.5.2 image, wired to the shared spark-events PVC.
The existing spark-history-ingress now has a valid backend.

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