Commit Graph

654 Commits

Author SHA1 Message Date
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
Janis Eccarius eefa6e728a feat(spark): deploy persistent Spark cluster with Web UI
- Add spark-cluster/base with Bitnami Spark chart 9.2.10 (master +
  2 workers), spark-events PVC (RWO/local-path), and Ingress resources
  for spark.nowchess.janis-eccarius.de (master UI) and
  spark-history.nowchess.janis-eccarius.de (history placeholder)
- Add spark-cluster/eu-central-1-prod overlay and ArgoCD Application
  (automated prune + selfHeal)
- Migrate all spark-analytics CronJobs and streaming Deployment from
  K8s-native mode (k8s://...) to Spark standalone (spark://spark-master:7077);
  drop kubernetes-specific --conf flags; add eventLog confs; mount
  spark-events PVC on all job pods

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-15 22:41:33 +02:00
Janis Eccarius a3eb172916 feat(nci): add Spark analytics Kubernetes manifests
Wire five Spark jobs (OpeningBook, PlayerStats, PlayerClustering,
PlayerGraph, LiveDashboard) to Kubernetes via native Spark-on-K8s mode.

- spark-analytics/base: ServiceAccount, RBAC Role/RoleBinding (driver
  executor pod management), two PVCs (10Gi output, 2Gi checkpoint),
  four CronJobs for batch analytics, one Deployment for the Structured
  Streaming live dashboard
- spark-analytics/eu-central-1-prod: namespace overlay pinning image
  to 0.1.0 with strategic merge patches that update both the container
  image field and the spark.kubernetes.container.image conf arg
- eu-central-1/argo-apps/spark-analytics: ArgoCD Application pointing
  at the prod overlay with automated prune+selfHeal sync

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-15 22:25:28 +02:00
svc.kargo 767a7f28a1 chore(kargo): update image tag tournament to 0.2.0 on staging (#382) 2026-06-15 22:23:21 +02:00
Janis 0373f61ef7 feat(nci-11): add Kubernetes manifests for nowchess-analysis service (#381)
Add Argo Rollout (blueGreen), active/preview Services, and HPA for the
new analysis service (port 8087). Wire image pins into all three overlay
kustomizations and register the analysis Warehouse and freight entries in
all three Kargo Stages (staging -> eu-central-1-prod / htwg-1-prod).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Janis Eccarius <eccariusjanis@gmail.com>
Reviewed-on: #381
2026-06-15 22:17:45 +02:00
shosho996 b546313e79 feat: NCI-12 kargo (#364)
Co-authored-by: Lala, Shahd <Shahd.Lala@sybit.de>
Reviewed-on: #364
Co-authored-by: Shahd Lala <shosho996@blackhole.local>
Co-committed-by: Shahd Lala <shosho996@blackhole.local>
2026-06-15 22:17:32 +02:00
svc.kargo afdc648347 chore(kargo): update image tag kargo to 1.10.7 (#380) 2026-06-12 18:23:35 +02:00
svc.kargo 93793671e3 chore(kargo): update image tag frontend to 0.3.0 on staging (#379) 2026-06-10 22:45:48 +02:00
Janis Eccarius 07a12d7060 feat(nci-11): add Kubernetes manifests for nowchess-analysis service
Delete PR Branch On Close / delete-branch (pull_request) Successful in 5s
Add Argo Rollout (blueGreen), active/preview Services, and HPA for the
new analysis service (port 8087). Wire image pins into all three overlay
kustomizations and register the analysis Warehouse and freight entries in
all three Kargo Stages (staging -> eu-central-1-prod / htwg-1-prod).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-10 16:03:20 +02:00
svc.kargo 8f6ae5b69e chore(kargo): update image tag core to 0.51.0 on staging (#378) 2026-06-10 11:55:00 +02:00
svc.kargo bbb57cfc15 chore(kargo): update image tag frontend to 0.2.8 on staging (#377) 2026-06-10 11:23:20 +02:00
svc.kargo 139a9f5169 chore(kargo): update image tag frontend to 0.2.7 on eu-central-1-prod (#376) 2026-06-10 10:33:48 +02:00