Skip to content

fix(chart): a ConfigMap/Secret change rolls the portal — checksum annotations on the pod template - #2801

Merged
rbuergi merged 1 commit into
mainfrom
fix/chart-restart-on-config-change
Aug 30, 2026
Merged

rbuergi merged 1 commit into
mainfrom
fix/chart-restart-on-config-change

Conversation

@rbuergi

@rbuergi rbuergi commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

The defect, measured

deploy/helm/templates/memex-portal/deployment.yaml carries no hash of the rendered ConfigMap/Secret on its pod template. The portal reads both as env at pod start (envFrom: configMapRef memex-portal-config / secretRef memex-portal-secrets), so a helm upgrade that changes only configuration rolls nothing:

  • memex-cloud, 2026-08-30 16:13Z, helm-release.yml deploy → revision 21, Release "memexcloud" has been upgraded, image kept (ci.6762).
  • kubectl get secret memex-portal-secrets (key names only): PluginCatalog__OpenRegistration__Key present.
  • Both portal pods: unchanged (started 16:07/16:09, before the upgrade).
  • POST /api/instances/register without a key: still 401 A valid registration bootstrap key is required — the process never loaded the value.

This is the "we set it and it vanished" shape helm-release.yml's header warns about, from the other side: the value did land, in an object nobody re-read.

The fix

Two annotations on the pod template, hashing the rendered config.yaml and secrets.yaml:

checksum/config:  {{ include (print $.Template.BasePath "/memex-portal/config.yaml")  . | sha256sum }}
checksum/secrets: {{ include (print $.Template.BasePath "/memex-portal/secrets.yaml") . | sha256sum }}

A configuration change now gets exactly the rollout an image change gets — graceful, one pod at a time under the PDB and the drain budget already on this template — and an upgrade that changes nothing restarts nothing.

Verification

  • helm lint deploy/helm → 0 failed.
  • helm template twice with the same values → identical hashes. With --set secrets.memex_portal.PluginCatalog__OpenRegistration__Key=… → only checksum/secrets changes, checksum/config identical (both templates render deterministically: no rand/now/lookup).
  • Chart Gate scripts locally: check-chart-invariants.sh → all 3 values combinations self-consistent; check-values-are-read.sh → all 115 keys read.
  • Only memex-portal-deployment consumes these objects (portal-next.yaml references neither), so the scope is that one Deployment.

What's New entry included (Category: Fix).

🤖 Generated with Claude Code

https://claude.ai/code/session_01C1SquDKJNKZxEUbuaPjUgu

…otations on the pod template

Config and secrets reach the portal as ENV at pod start. Without a hash of the rendered
ConfigMap/Secret on the pod template, `helm upgrade` with a changed value reports "deployed",
the rendered objects carry the value, and no running process ever reads it. Measured on
memex-cloud revision 21 (2026-08-30 16:13Z): memex-portal-secrets rendered
PluginCatalog__OpenRegistration__Key, the image was unchanged, both pods stayed up and kept
answering 401.

The two annotations turn a configuration change into the same graceful one-at-a-time rollout
an image change gets, and into nothing when nothing changed: both templates render
deterministically from values, so `helm template` twice with the same values yields the same
hash, and only the secrets hash moves when a secret moves (proved by rendering with and without
--set secrets.memex_portal.PluginCatalog__OpenRegistration__Key).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01C1SquDKJNKZxEUbuaPjUgu
Copilot AI lite review requested due to automatic review settings August 30, 2026 16:16

Copilot AI left a comment

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.

Pull request overview

This PR fixes a Helm chart rollout gap where updates to the rendered ConfigMap/Secret (consumed via envFrom) did not trigger a Deployment rollout, leaving running portal pods on stale configuration. It does this by adding checksum annotations to the pod template so any config/secret change causes a graceful rolling restart, and documents the behavior change in What’s New.

Changes:

  • Add pod-template annotations hashing the rendered memex-portal ConfigMap and Secret to trigger rollouts on configuration-only upgrades.
  • Add a What’s New entry documenting that config/secret-only Helm upgrades now restart the portal pods.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
deploy/helm/templates/memex-portal/deployment.yaml Adds checksum/config and checksum/secrets annotations to the pod template to force a rollout when ConfigMap/Secret content changes.
src/MeshWeaver.Documentation/Data/WhatsNew/2026-08-30-a-configuration-change-now-restarts-the-portal.md Documents the operational behavior change for configuration/secret updates.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@github-actions

Copy link
Copy Markdown
Contributor

Test Results (shard 3)

444 tests  ±0   444 ✅ ±0   4m 57s ⏱️ +33s
  6 suites ±0     0 💤 ±0 
  6 files   ±0     0 ❌ ±0 

Results for commit b510853. ± Comparison against base commit a7cc0a7.

@github-actions

Copy link
Copy Markdown
Contributor

Test Results (shard 0)

1 178 tests  ±0   985 ✅ ±0   5m 39s ⏱️ +11s
    5 suites ±0   193 💤 ±0 
    5 files   ±0     0 ❌ ±0 

Results for commit b510853. ± Comparison against base commit a7cc0a7.

@github-actions

Copy link
Copy Markdown
Contributor

Test Results (shard 5)

2 184 tests  ±0   2 180 ✅ ±0   6m 42s ⏱️ +17s
   10 suites ±0       4 💤 ±0 
   10 files   ±0       0 ❌ ±0 

Results for commit b510853. ± Comparison against base commit a7cc0a7.

@github-actions

Copy link
Copy Markdown
Contributor

Test Results (shard 1)

988 tests  ±0   988 ✅ ±0   5m 57s ⏱️ -8s
  5 suites ±0     0 💤 ±0 
  5 files   ±0     0 ❌ ±0 

Results for commit b510853. ± Comparison against base commit a7cc0a7.

@github-actions

Copy link
Copy Markdown
Contributor

Test Results (shard 2)

624 tests  ±0   624 ✅ ±0   6m 7s ⏱️ +6s
  6 suites ±0     0 💤 ±0 
  6 files   ±0     0 ❌ ±0 

Results for commit b510853. ± Comparison against base commit a7cc0a7.

@github-actions

Copy link
Copy Markdown
Contributor

Test Results (shard 4)

   10 files  ±0     10 suites  ±0   5m 54s ⏱️ +14s
3 084 tests ±0  3 084 ✅ ±0  0 💤 ±0  0 ❌ ±0 
3 750 runs  +1  3 750 ✅ +1  0 💤 ±0  0 ❌ ±0 

Results for commit b510853. ± Comparison against base commit a7cc0a7.

@github-actions

Copy link
Copy Markdown
Contributor

Test Results

   42 files  ±0     42 suites  ±0   35m 19s ⏱️ + 1m 14s
8 502 tests ±0  8 305 ✅ ±0  197 💤 ±0  0 ❌ ±0 
9 168 runs  +1  8 971 ✅ +1  197 💤 ±0  0 ❌ ±0 

Results for commit b510853. ± Comparison against base commit a7cc0a7.

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