Skip to content

KEEP-818-keeperhub-stack-umbrella-chart#69

Merged
OleksandrUA merged 2 commits into
mainfrom
KEEP-818-keeperhub-stack-umbrella-chart
Jun 12, 2026
Merged

KEEP-818-keeperhub-stack-umbrella-chart#69
OleksandrUA merged 2 commits into
mainfrom
KEEP-818-keeperhub-stack-umbrella-chart

Conversation

@OleksandrUA

Copy link
Copy Markdown
Contributor

What

Adds a new umbrella chart charts/keeperhub-stack that deploys the KeeperHub execution pipeline as a single Helm release so the whole stack can be upgraded and rolled back atomically.

It depends on the existing common chart once per component, aliased: app, executor, schedule, block, metricsCollector. common is not modified.

Why

Today each component is its own Helm release of common, deployed by separate CI workflows on independent triggers, so a deploy rolls the components over a multi-minute window. While the dispatchers are already on the new version but the executor/app are still cycling, triggers keep being created that no runner picks up. Those executions sit until the 30-minute reaper marks them Execution timed out: no progress for 30 minutes, which classifies as a system error and paged P2 in incident Q1005I00XZ1ZPH (KEEP-818).

A single release lets helm upgrade --install --atomic --wait flip the whole stack in one coordinated operation and roll everything back if any component fails its readiness check, instead of leaving a half-upgraded stack.

How to use

helm dependency build charts/keeperhub-stack
helm upgrade --install keeperhub charts/keeperhub-stack \
  -f keeperhub/deploy/keeperhub/<env>/values.yaml \
  --namespace keeperhub --atomic --wait --timeout 15m

Real image tags / env / SSM secrets come from the keeperhub repo's per-env values via -f, same as today. The chart's own values.yaml is placeholders.

Notes for reviewers

  • Vendored dependency. The repo CI (helm-release.yml) runs helm template / --dry-run with no helm dependency build step, and every existing chart is standalone. To make the first dependent chart pass CI without touching the shared workflow, the common subchart is vendored: Chart.lock + charts/common-0.3.0.tgz (built from file://../common). If you'd rather not commit the archive, the alternative is adding a helm dependency build step to the workflow - happy to switch to that.
  • common test-template quirk. common's tests/test-connection.yaml dereferences .Values.service.port, and certificate.yaml does and .Values.service.enabled .Values.service.tls.enabled (Go and evaluates both operands). So every component carries a full service block (with tls.enabled) even when it runs no HTTP server. Worth fixing in common separately (guard those templates); noted but out of scope here.
  • metricsCollector name. Alias is camelCase for clean values access; nameOverride: metrics-collector keeps the rendered resources RFC1123-valid.

Validation (local)

  • helm lint passes with defaults and with test-values.yaml.
  • helm template renders 5 Deployments (keeperhub-app/executor/schedule/block/metrics-collector), Services only for app + executor, all names lowercase/RFC1123.
  • Component enable/disable toggles verified (--set metricsCollector.enabled=false drops its resources).

Out of scope (follow-ups)

  • Cutover from the 5 standalone releases to this one (resource ownership/adoption, naming) - needs a planned migration.
  • CI consolidation in the keeperhub repo (5 deploy workflows to 1).
  • Atomic deploy shrinks but doesn't fully eliminate the orphan window; pair with dispatcher graceful drain and/or the KEEP-818 re-queue fix.

Wrap the common chart once per KeeperHub execution-pipeline component (app,
executor, schedule + block dispatchers, metrics collector) as aliased
dependencies so the whole stack deploys as a single Helm release.

A single release lets 'helm upgrade --install --atomic --wait' roll all
components together and roll all of them back if any one fails its readiness
check, instead of the current per-release rollovers that span several minutes.
That staggered window is what orphaned in-flight executions in incident
Q1005I00XZ1ZPH (KEEP-818): triggers created mid-rollout were never picked up
and got reaped 30 min later as system errors, paging P2.

The common subchart is vendored (Chart.lock + charts/common-0.3.0.tgz) so the
chart renders under the repo's existing CI, which has no helm-dependency-build
step. Validated locally: helm lint and helm template pass with defaults and
test-values; all five Deployments render with RFC1123-valid names; component
enable/disable toggles work.
@github-actions

Copy link
Copy Markdown

❌ Helm Chart Tests Failed

Some charts failed validation:

Chart Version Check Template Validation Dry-run Installation Overall Status
keeperhub-stack ℹ️ New chart ❌ Failed ❌ Failed ❌ Failed

Summary:

  • 📊 Charts tested: keeperhub-stack
  • ❌ Failed charts: keeperhub-stack,keeperhub-stack
  • ✅ Successful charts: ****

🔍 Debugging Information:

Please fix the issues before merging. 🔧

common's NOTES.txt evaluates 'contains "NodePort" .Values.service.type'
unconditionally (Go template 'and' does not short-circuit), so every component
needs service.type as a string even when service.enabled is false. The
dispatchers and metrics collector were missing it, which failed the CI dry-run
(helm renders subchart NOTES.txt during install; plain 'helm template' skips it,
so it slipped past local checks). Verified with a full --dry-run install.
@github-actions

Copy link
Copy Markdown

🎉 Helm Chart Tests Passed!

All modified charts have been successfully validated:

Chart Version Check Template Validation Dry-run Installation Overall Status
keeperhub-stack ℹ️ New chart ✅ Passed ✅ Passed ✅ Passed

Summary:

  • ✅ Charts tested: keeperhub-stack
  • ✅ All template validations passed
  • ✅ All dry-run installations passed

📋 Detailed Information:

The PR is ready for review! 🚀

Note: Charts will be automatically released when this PR is merged to main.

Comment on lines +2 to +16
- name: common
repository: file://../common
version: 0.3.0
- name: common
repository: file://../common
version: 0.3.0
- name: common
repository: file://../common
version: 0.3.0
- name: common
repository: file://../common
version: 0.3.0
- name: common
repository: file://../common
version: 0.3.0

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This feels like it was supposed to have different names instead of all being called "common".

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sanbotto yes, this is a weird limitation of Helm -- a dependency's name must match the actual chart name at its repository 😕

@OleksandrUA OleksandrUA merged commit ece912e into main Jun 12, 2026
4 checks passed
@OleksandrUA OleksandrUA deleted the KEEP-818-keeperhub-stack-umbrella-chart branch June 12, 2026 16:33
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.

2 participants