Skip to content

feat: K8s ConfigMap session store - #7

Merged
Negashev merged 1 commit into
mainfrom
feat/k8s-configmap-session-store
Jul 30, 2026
Merged

Negashev merged 1 commit into
mainfrom
feat/k8s-configmap-session-store

Conversation

@Negashev

Copy link
Copy Markdown
Owner

Problem

/tmp/aldaas is ephemeral storage — lost on pod restart (node eviction, OOM, liveness probe fail). aldaas client loses the workflow name → orders a new workflow → old one idles until uptime-killer (300s) → resource waste + downtime.

Solution

When K8S_SESSION_STORE=true env var is set, store the workflow name in a Kubernetes ConfigMap aldaas-session-${ALDAAS_NAME} instead of /tmp/aldaas. ConfigMap persists in etcd across pod restarts.

Fallback to /tmp/aldaas when env var not set (backward compatibility).

Changes

  • tunnel/aldaas.sh: K8S_SESSION_STORE conditional — ConfigMap read/write vs /tmp file
  • tunnel/Dockerfile: add kubectl v1.33.0 binary (multi-stage build)

RBAC

Requires Role + RoleBinding for configmap create/get/update/patch in the deployment namespace. Configured via HELM_UPGRADE_VALUES_FILE customResources (separate change in GitLab CI/CD).

Testing

  • bash -n tunnel/aldaas.sh — syntax OK (POSIX sh / Alpine ash)
  • Backward compat: without K8S_SESSION_STORE, uses /tmp/aldaas (unchanged behavior)
  • K8s mode: with K8S_SESSION_STORE=true, reads/writes ConfigMap

/tmp/aldaas is ephemeral — lost on pod restart (node eviction, OOM,
liveness probe fail). Client loses workflow name → orders new workflow
→ old one idles until uptime-killer (300s) → resource waste + downtime.

Add K8S_SESSION_STORE env var: when true, store workflow name in
ConfigMap aldaas-session-${ALDAAS_NAME} (persists across pod restarts).
Fallback to /tmp/aldaas when not set (backward compatibility).

Add kubectl binary to Dockerfile (v1.33.0) for ConfigMap operations.
@Negashev
Negashev merged commit 71322c4 into main Jul 30, 2026
1 check passed
@Negashev
Negashev deleted the feat/k8s-configmap-session-store branch July 30, 2026 11:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant