You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(chart): the default install works with one helm command; the chart no longer creates the release's own namespace by default (#1403, #1404, #1405, #1406) - #1464
An agent wrote this. It replaces the workaround #1398 documented.
Upgrading an existing install. If an older chart installed the release with namespace.create=false, run this once before upgrading:
kubectl annotate namespace aether-system helm.sh/resource-policy=keep
# prober chart, before its first upgrade to 1.0.6 (every prober release: its default was already false)
kubectl annotate namespace <prober namespace> helm.sh/resource-policy=keep
Without it the first upgrade is refused with a message naming that command; nothing is changed or deleted. Under a GitOps controller that drives Helm the symptom is a release that fails to upgrade until the namespace is annotated. Installs made with the old default need nothing. The maintainer chose this rule: a refusal that names the command over any path to a deleted namespace.
The problem
With namespace.create=true (the old default) and the release stored in the namespace the chart creates, no single helm command could first-install: Helm writes the release record into the release namespace before it creates anything the chart renders.
What changes
charts/aether 2.4.21
namespace.create defaults to false. The first install is one helm command with --create-namespace. On a cluster that enforces Pod Security admission the operator labels the namespace first (the three pod-security.kubernetes.io/{enforce,audit,warn}=privileged labels the chart used to set); the docs give the kubectl label command.
namespace.create=true stays for a release stored in a different namespace. For the release's own namespace the render fails and names both ways out. The edge namespace is unchanged in the normal case and gets the same check for a release stored in the edge namespace itself.
Upgrade safety, in one step. A release installed with the old default owns its Namespace, and Helm deletes an object that leaves the manifest. The chart reads the live namespace at render time (lookup): one this release owns is rendered whatever namespace.create says, and now carries helm.sh/resource-policy: keep. The default flip therefore lands in this release, not a later one.
On an upgrade the Namespace is left out of the render only when the chart can see that is safe: the live namespace carries helm.sh/resource-policy: keep, or the previous revision was written by this chart and recorded that it rendered none (an annotation on the agent ServiceAccount). Otherwise the render is refused with the one kubectl annotate ... helm.sh/resource-policy=keep command. That covers a failed first install of an older chart, a namespace that lost every sign of its owner, and, because the chart cannot tell it apart, a release an older chart installed with namespace.create=false (see "What an operator does on upgrade").
A namespace that lost only Helm's ownership annotations is still recognised by the labels every chart version put on it, and keeps being rendered.
The install notes print a NAMESPACE NOTE when the namespace is not labelled privileged.
charts/prober 1.0.6 — the same rule for namespace.create=true and the same protection for a namespace the chart rendered. Its default was already false. It reads the cluster on an upgrade only, so a first install with default values needs no access to the Namespace object.
CI — e2e/first-install.sh and a first-install job in the nightly e2e workflow, through run-e2e-script.
Docs — the adoption pre-step is gone from README.md, charts/README.md, docs/getting-started.md, docs/runbook.md, docs/configuration.md and website/pages/index.md. The runbook gains "Recovering from a failed first install" and "Chart 2.4.21".
Upgrade safety: measured on kind
kind v0.33.0, kindest/node:v1.35.8, Helm 3.18.4, one node, the API server enforcing Pod Security baseline by default. "Old" is the chart on main (2.4.20). The namespace UID is compared before and after.
Start
Then
Result
Control: old default, release owns the namespace (8 pods)
main's chart with only the default flipped, no values
upgrade reports deployed; namespace Terminating, then gone, with the pods and the release record
(a) old default, release owns the namespace
this chart, no values
same UID, Active, 8 pods; Namespace still in the manifest, now with keep
this chart, namespace.create=false
same UID; still in the manifest
ownership annotations removed by hand, then this chart
Namespace leaves the manifest; same UID (keep stops the delete)
helm uninstall
namespace stays
(b) old chart, explicit namespace.create=true
this chart, namespace.create=true; then no values
same UID both times
(c) old chart, namespace.create=false + --create-namespace
this chart, same values; then no values
refused both times, naming kubectl annotate namespace aether-system helm.sh/resource-policy=keep; same UID, release still at revision 1
that command, then this chart
deployed, same UID, 8 pods
keep removed again, this chart again
deployed, same UID (the marker is stamped; no step needed any more)
Control (before the last fix): old default, deployed, namespace lost Helm's ownership annotations
this branch as it was
upgrade reports deployed; namespace Terminating
the same
this chart
same UID, Active; Namespace stays in the manifest, keep and the ownership annotations are back (recognised by the chart's labels)
old default, deployed, namespace lost the annotations and the chart's labels
this chart
refused with the same kubectl annotate command; same UID
prober, old chart, namespace.create=true stored elsewhere, namespace lost the annotations
this chart, namespace.create=false
same UID, keep back (it was Terminating before the last fix)
Control (before the last fix): old chart rendering ns-old, release stored elsewhere
this branch as it was, namespace.name=ns-new
upgrade reports deployed; ns-oldTerminating
the same
this chart, namespace.name=ns-new
refused, naming kubectl annotate namespace ns-old helm.sh/resource-policy=keep; ns-old untouched, ns-new not created
that command, the same helm command again
deployed; ns-old same UID, ns-new Active
this chart, first install failed on a --wait timeout (re-measured with the final chart)
the same command again
deployed, no extra step (the ServiceAccount carries the marker false)
old chart, failed first install (--create-namespace, "already exists")
that command, the labels, the same helm command again
deployed, same UID, 8 pods
prober, old chart, namespace.create=true stored elsewhere
old chart, namespace.create=false (control)
namespace deleted
the same
this chart, namespace.create=false
same UID, keep
Why lookup rather than a two-release transition: helm.sh/resource-policy: keep only protects an object that already carries it, so a keep-only release followed by a later flip would still delete the namespace of anyone who skipped the first one. The chart already depends on lookup (the seeded MeshConfig, the webhook Secret).
What is left. Under Helm the upgrade either keeps rendering the namespace, finds keep, finds the marker, or is refused. Known gaps, all outside the default flip:
The refusal also hits two safe cases the chart cannot tell apart: an old namespace.create=false install (the one-time step above), and a first install of this chart that failed before its ServiceAccount was written.
Moving a release to another namespace on an upgrade (namespace.name changed) is refused while a namespace the release owns would be left behind without keep. It finds that namespace by Helm's ownership annotations only, so an old namespace that also lost those is not seen. The prober chart runs this check only when namespace.name or namespace.create is set (it needs a cluster-wide namespace list), so a prober release moved back to its own release namespace with both values at their defaults is not covered.
Turning the edge off still removes the edge namespace the chart made, as on main.
The limit of this.helm template has no cluster, so it cannot see ownership and renders no Namespace. Helm itself is safe (measured above). A pipeline that renders with helm template and prunes what left the render would remove a namespace the old chart rendered. I did not test any such tool. The docs tell those users to protect the namespace in their tool before upgrading.
Pod Security: measured
Unlabelled namespace, one helm command: the release is deployed, the two Deployments get their pods, the four DaemonSets get none (FailedCreate: violates PodSecurity "baseline:latest").
Namespace labelled first: 8 pods, zero FailedCreate events, all six workloads Ready.
Label applied 25 s after the refusals began: pods within 5 s. Applied after 4 minutes: no pods 20 s later; kubectl -n aether-system rollout restart daemonset brought them at once. The docs give both commands.
Renders, before and after (helm template, no cluster)
Values
main
this branch
default, release in aether-system
1 Namespace
no Namespace
namespace.create=false
no Namespace
no Namespace
namespace.create=true, release elsewhere
Namespace
Namespace + helm.sh/resource-policy: keep
namespace.create=true, release in aether-system
Namespace (uninstallable)
render error
edge.enabled=true
edge Namespace, baseline
the same
The only other difference in any render is one annotation on the agent ServiceAccount (aether.io/release-namespace-rendered), and on the prober's. No pod template changes, so the upgrade rolls nothing.
Red, then green
Template tests (19 new, written first): against main's templates 17 fail and 2 pass; the 2 are guards that must hold on both sides (the edge namespace still renders; the prober default renders no Namespace). On the branch bazel test //charts/... //e2e:all //website:site_test passes.
e2e/first-install.sh:
main's chart and docs: red at the docs check (the label command is not there).
main's chart with this branch's docs: red at the install, namespaces "aether-system" already exists.
this branch: green; up 111 s, verify about 6 minutes on a clean cluster (most of it one namespace deletion waiting out the proxy pod's 180 s termination grace period).
a scratch copy of this chart with the failed-first-install guard removed: red in the guard leg, namespace Terminating.
a scratch copy of this chart with the ownership lookup removed: red in the upgrade-safety leg ("a namespace the release owns is not in its manifest"), so that leg can fail.
bazel build --config=lint --@aspect_rules_lint//lint:fail_on_violation //..., make format-check, make actionlint, scripts/check-shell-lint.sh, scripts/check-chart-version-bump.sh origin/main: clean.
What an operator does on upgrade
Installed with the old default or namespace.create=true: nothing. helm uninstall will leave the namespace behind from now on.
Installed by an older chart with namespace.create=false: one command, once, before the upgrade or when the refused upgrade names it: kubectl annotate namespace aether-system helm.sh/resource-policy=keep. It is harmless on a namespace the release never rendered and may be removed after that upgrade. This is the cost of refusing the cases above without being able to read the previous manifest; every later upgrade passes without it. A GitOps controller driving Helm shows the refusal as a failed release until the namespace is annotated.
The prober chart 1.0.6 asks the same of its namespace on the first upgrade from an older chart.
Rendering with helm template and pruning: protect the namespace in that tool first.
The check before and after is in the runbook, "Chart 2.4.21" (namespace UID, helm get manifest | grep -c '^kind: Namespace', and a --dry-run=server render).
Not verified
The new workflow job has not run on GitHub; it runs nightly or by workflow_dispatch with only=first-install. Locally the script ran with images built from this tree.
In CI the failed-first-install state is rebuilt with this chart (a first install the API server rejects, then ownership and keep removed from the namespace); the real pre-2.4.21 chart was only measured by hand.
Only Helm 3.18.4, and only Helm's secret storage driver. With another driver the failed-first-install guard sees no release record and does not act.
No GitOps tool was tried. That a controller driving the Helm SDK against the cluster behaves like the CLI is inferred.
helm rollback across the change could not be measured cleanly: rolling back to a first revision already fails on main (no MeshConfig with the name "default" found), unrelated to this change. The namespace kept its UID through the failed rollback and the next upgrade.
restricted enforcement was not tried, only baseline.
The published OCI charts were not installed; the runs use the charts from this tree.
…y default; a namespace the release owns is never deleted (#1403, #1405)
Helm writes the release record into the release namespace before it creates
anything a chart renders, so with namespace.create=true and the release stored
in that namespace no helm command could first-install: "already exists" with
--create-namespace, "not found" without, "invalid ownership metadata" for a
namespace made with kubectl.
charts/aether (2.4.21):
- namespace.create defaults to false. Helm (--create-namespace) or the operator
creates the namespace, and the operator labels it for Pod Security admission.
- namespace.create=true is for a release stored in another namespace. For the
release's own namespace the render fails and names both ways out. The edge
namespace has the same check (a release stored in the edge namespace).
- Upgrade safety. A release installed with the old default owns its Namespace,
and Helm deletes an object that leaves the manifest. A Namespace the live
cluster says this release owns is therefore rendered whatever
namespace.create says, and carries helm.sh/resource-policy: keep.
- A release whose only revision is a failed first install of an older chart
lists a Namespace it does not own; upgrading it would delete the namespace.
That upgrade is refused with the command that makes it safe. The agent
ServiceAccount records whether a render included the Namespace, so a failed
first install of this chart is retried without that step.
- The install notes say when the namespace is not labelled privileged.
charts/prober (1.0.6): the same rule for namespace.create=true, the same
protection for a namespace the chart rendered.
Template tests were written first and fail against the unchanged charts.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
…th default values, and upgrades once (#1404)
e2e/first-install.sh runs the documented commands on an empty kind cluster whose
API server enforces Pod Security "baseline" by default, with SPIRE installed as
the documented prerequisite: the crds chart, the namespace and its three
pod-security labels, one `helm upgrade --install ... --create-namespace` with
default values (only the image coordinates point at the build under test), then
the same command again. It also checks that the docs give those commands, that
the cluster refuses the agent's kind of pod without the labels, that
namespace.create=true for the release's own namespace fails the render and
leaves nothing behind, and that a release which owns its namespace keeps it
across upgrades.
The job runs through the existing run-e2e-script composite action.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
…s; recovery commands overwrite existing pod-security labels
Review round 1.
- e2e/first-install.sh builds the state the guard exists for (a release never
deployed, whose failed revision lists a Namespace it does not own) for the
aether chart and the prober chart, and asserts the upgrade is refused with the
fix in the message, the namespace untouched, and the same upgrade going
through once the namespace is marked keep. Against a copy of the chart without
the guard the leg fails with the namespace Terminating.
- The recovery commands (install notes, the guard's message, the runbook) pass
--overwrite: a namespace already labelled baseline or restricted refuses a
plain `kubectl label`. The note also prints the level it found.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
Document create-namespace limitation for custom target namespaces
charts/aether/values.yaml:34
--create-namespace creates only Helm's release namespace, not a different namespace selected by namespace.name. With namespace.create=false and -n releases --set namespace.name=aether-system, this documented command leaves aether-system absent and the install fails. Clarify that the flag works only when the target is the release namespace; otherwise the target must be created beforehand.
Handle custom target namespaces with create-namespace
charts/prober/values.yaml:9
--create-namespace creates the release namespace only. If namespace.name points elsewhere while create=false, following this comment still leaves the prober's target namespace missing and all rendered resources fail to install. Distinguish the default same-namespace case from a custom target namespace.
Clarify create-namespace and custom target namespace semantics
docs/configuration.md:27
This says Helm can create the target whenever namespace.create=false, but --create-namespace only creates .Release.Namespace. If namespace.name selects another namespace, that target must already exist or every namespaced resource fails. Document that distinction here because these are the canonical value semantics.
…an upgrade only
Review round 2. The prober chart's default render is a DaemonSet and a
ServiceAccount, which an operator limited to one namespace may install; reading
the Namespace on a first install could refuse them, and a first install has no
stored manifest to protect. Ownership and the failed-first-install guard are now
evaluated on upgrades only. The e2e leg for the prober guard builds its state
the supported way (namespace.create=true, release stored in another namespace).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
The guard accepts any existing value other than keep, but this remediation cannot replace an existing annotation because kubectl annotate defaults to --overwrite=false. A namespace with helm.sh/resource-policy set to another value remains blocked by the command in the error; include --overwrite so the prescribed fix works for every state this branch handles.
This branch also matches a namespace whose resource-policy annotation exists with a non-keep value, but the printed command cannot replace that value without --overwrite. Make the remediation command work for all states that trigger the guard.
Add --overwrite so recovery command succeeds
docs/runbook.md:1422
The chart guard also triggers when helm.sh/resource-policy exists with a value other than keep. In that case this recovery command fails rather than replacing it, so the documented upgrade remains blocked; add --overwrite to match the states handled by the guard.
…espace.create=true gets the message with the fix first; the first-install job declares its permissions
Review round 3.
- Both charts checked "cannot create the release's own namespace" before the
failed-first-install guard. The failed installs the guard is about were made
with namespace.create=true, so a retry of that command got the "cannot create"
message, and only after changing the value the one that names
`helm.sh/resource-policy=keep`: two failures. The guard now runs first in that
case, and its message says to drop namespace.create=true as well.
- The prober chart reads namespace ownership on an upgrade or when
namespace.create is set (not on a default first install).
- e2e/first-install.sh builds the state with the release stored in the target
namespace and namespace.create=true, for both charts, and retries with and
without namespace.create=true; both must be refused by the guard's message.
Seen red against the previous ordering, green after.
- The first-install job declares `permissions: contents: read`.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
…an see that is safe
Review round 4. A deployed release of an older chart whose Namespace had lost
Helm's ownership annotations looked unowned on the very upgrade that drops the
Namespace from the manifest, before `keep` was ever stamped, and Helm deleted
it (reproduced on kind with the chart on main: namespace Terminating).
Both charts:
- On an upgrade the labels every chart version put on the Namespace it rendered
(app.kubernetes.io/managed-by: Helm, app.kubernetes.io/instance: <release>)
count as ownership too, on a namespace without `keep`. Helm patches a
Namespace that is in the previous manifest and stamps ownership and `keep`
back.
- Otherwise the Namespace is left out of an upgrade only when the live
namespace carries helm.sh/resource-policy: keep, or the previous revision was
written by this chart and recorded that it rendered none (the ServiceAccount
marker). Anything else is refused with the one `kubectl annotate` command.
The check no longer reads Helm's release Secrets.
User-visible cost: a release an older chart installed with
namespace.create=false cannot be told from one whose namespace lost every sign
of its owner, so its first upgrade is refused until the namespace has been
annotated once. The runbook, getting-started, configuration and values say so.
e2e/first-install.sh covers the drift case for both charts and the one-time
refusal for an unmarked release.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
…ed namespace to be deleted; the one-time keep step leads the upgrade notes
Review round 5.
- Both charts: an upgrade that changes namespace.name (or edge.namespace) no
longer renders the namespace the release rendered before, and Helm deleted
it (reproduced on kind: Terminating). On an upgrade, a namespace carrying
Helm's ownership annotations for this release that the render no longer
names, and that has no helm.sh/resource-policy: keep, now fails the render
with the command that protects it. The prober chart runs the check only when
namespace.name or namespace.create is set (it lists the cluster's
namespaces). e2e/first-install.sh has a leg for it.
- The refusal for an unmarked release stays as it is (maintainer's decision: a
refusal that names the command over any path to a delete). Its message now
also names a first install that failed before the ServiceAccount was
written, and the docs say such a retry may ask for the annotation once.
- The runbook's "Chart 2.4.21" section leads with the one command for releases
an older chart installed with namespace.create=false, for both charts, and
the GitOps symptom.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
Include --overwrite in resource-policy annotation remediation
charts/aether/templates/_helpers.tpl:124
This branch also runs when helm.sh/resource-policy already exists with a non-keep value, but the prescribed kubectl annotate command cannot replace an existing annotation without --overwrite. In that state the upgrade remains blocked even after following the error. Include --overwrite in the command.
This issue also appears on line 149 of the same file.
Add --overwrite to Pod Security label recovery command
charts/aether/templates/namespace.yaml:35
This error path can apply to a pre-existing namespace already labelled baseline or restricted, but the displayed kubectl label command cannot replace those values without --overwrite. The advertised way out therefore fails for that common Pod Security state; include --overwrite as the other remediation messages do.
Add --overwrite to annotation recovery command
charts/prober/templates/_helpers.tpl:93
This condition includes namespaces where the resource-policy annotation already has a non-keep value. The command in the failure message then fails unless --overwrite is supplied, so following the stated recovery cannot unblock the upgrade.
This issue also appears on line 115 of the same file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1403
Closes #1404
Closes #1405
Closes #1406
An agent wrote this. It replaces the workaround #1398 documented.
The problem
With
namespace.create=true(the old default) and the release stored in the namespace the chart creates, no single helm command could first-install: Helm writes the release record into the release namespace before it creates anything the chart renders.What changes
charts/aether2.4.21namespace.createdefaults to false. The first install is one helm command with--create-namespace. On a cluster that enforces Pod Security admission the operator labels the namespace first (the threepod-security.kubernetes.io/{enforce,audit,warn}=privilegedlabels the chart used to set); the docs give thekubectl labelcommand.namespace.create=truestays for a release stored in a different namespace. For the release's own namespace the render fails and names both ways out. The edge namespace is unchanged in the normal case and gets the same check for a release stored in the edge namespace itself.Namespace, and Helm deletes an object that leaves the manifest. The chart reads the live namespace at render time (lookup): one this release owns is rendered whatevernamespace.createsays, and now carrieshelm.sh/resource-policy: keep. The default flip therefore lands in this release, not a later one.helm.sh/resource-policy: keep, or the previous revision was written by this chart and recorded that it rendered none (an annotation on the agent ServiceAccount). Otherwise the render is refused with the onekubectl annotate ... helm.sh/resource-policy=keepcommand. That covers a failed first install of an older chart, a namespace that lost every sign of its owner, and, because the chart cannot tell it apart, a release an older chart installed withnamespace.create=false(see "What an operator does on upgrade").NAMESPACE NOTEwhen the namespace is not labelled privileged.charts/prober1.0.6 — the same rule fornamespace.create=trueand the same protection for a namespace the chart rendered. Its default was alreadyfalse. It reads the cluster on an upgrade only, so a first install with default values needs no access to the Namespace object.CI —
e2e/first-install.shand afirst-installjob in the nightlye2eworkflow, throughrun-e2e-script.Docs — the adoption pre-step is gone from
README.md,charts/README.md,docs/getting-started.md,docs/runbook.md,docs/configuration.mdandwebsite/pages/index.md. The runbook gains "Recovering from a failed first install" and "Chart 2.4.21".Upgrade safety: measured on kind
kind v0.33.0,
kindest/node:v1.35.8, Helm 3.18.4, one node, the API server enforcing Pod Securitybaselineby default. "Old" is the chart onmain(2.4.20). The namespace UID is compared before and after.deployed; namespaceTerminating, then gone, with the pods and the release recordActive, 8 pods; Namespace still in the manifest, now withkeepnamespace.create=falsekeepstops the delete)helm uninstallnamespace.create=truenamespace.create=true; then no valuesnamespace.create=false+--create-namespacekubectl annotate namespace aether-system helm.sh/resource-policy=keep; same UID, release still at revision 1deployed, same UID, 8 podskeepremoved again, this chart againdeployed, same UID (the marker is stamped; no step needed any more)deployed; namespaceTerminatingActive; Namespace stays in the manifest,keepand the ownership annotations are back (recognised by the chart's labels)kubectl annotatecommand; same UIDnamespace.create=truestored elsewhere, namespace lost the annotationsnamespace.create=falsekeepback (it wasTerminatingbefore the last fix)ns-old, release stored elsewherenamespace.name=ns-newdeployed;ns-oldTerminatingnamespace.name=ns-newkubectl annotate namespace ns-old helm.sh/resource-policy=keep;ns-olduntouched,ns-newnot createddeployed;ns-oldsame UID,ns-newActive--waittimeout (re-measured with the final chart)deployed, no extra step (the ServiceAccount carries the markerfalse)--create-namespace, "already exists")deployed; namespaceTerminatingkubectl annotate namespace aether-system helm.sh/resource-policy=keep; namespace untoucheddeployed, same UID, 8 podsnamespace.create=truestored elsewherenamespace.create=false(control)namespace.create=falsekeepWhy
lookuprather than a two-release transition:helm.sh/resource-policy: keeponly protects an object that already carries it, so a keep-only release followed by a later flip would still delete the namespace of anyone who skipped the first one. The chart already depends onlookup(the seededMeshConfig, the webhook Secret).What is left. Under Helm the upgrade either keeps rendering the namespace, finds
keep, finds the marker, or is refused. Known gaps, all outside the default flip:namespace.create=falseinstall (the one-time step above), and a first install of this chart that failed before its ServiceAccount was written.namespace.namechanged) is refused while a namespace the release owns would be left behind withoutkeep. It finds that namespace by Helm's ownership annotations only, so an old namespace that also lost those is not seen. The prober chart runs this check only whennamespace.nameornamespace.createis set (it needs a cluster-wide namespace list), so a prober release moved back to its own release namespace with both values at their defaults is not covered.The limit of this.
helm templatehas no cluster, so it cannot see ownership and renders noNamespace. Helm itself is safe (measured above). A pipeline that renders withhelm templateand prunes what left the render would remove a namespace the old chart rendered. I did not test any such tool. The docs tell those users to protect the namespace in their tool before upgrading.Pod Security: measured
deployed, the two Deployments get their pods, the four DaemonSets get none (FailedCreate:violates PodSecurity "baseline:latest").FailedCreateevents, all six workloads Ready.kubectl -n aether-system rollout restart daemonsetbrought them at once. The docs give both commands.Renders, before and after (
helm template, no cluster)aether-systemnamespace.create=falsenamespace.create=true, release elsewherehelm.sh/resource-policy: keepnamespace.create=true, release inaether-systemedge.enabled=trueThe only other difference in any render is one annotation on the agent ServiceAccount (
aether.io/release-namespace-rendered), and on the prober's. No pod template changes, so the upgrade rolls nothing.Red, then green
bazel test //charts/... //e2e:all //website:site_testpasses.e2e/first-install.sh:namespaces "aether-system" already exists.up111 s,verifyabout 6 minutes on a clean cluster (most of it one namespace deletion waiting out the proxy pod's 180 s termination grace period).Terminating.lookupremoved: red in the upgrade-safety leg ("a namespace the release owns is not in its manifest"), so that leg can fail.bazel build --config=lint --@aspect_rules_lint//lint:fail_on_violation //...,make format-check,make actionlint,scripts/check-shell-lint.sh,scripts/check-chart-version-bump.sh origin/main: clean.What an operator does on upgrade
namespace.create=true: nothing.helm uninstallwill leave the namespace behind from now on.namespace.create=false: one command, once, before the upgrade or when the refused upgrade names it:kubectl annotate namespace aether-system helm.sh/resource-policy=keep. It is harmless on a namespace the release never rendered and may be removed after that upgrade. This is the cost of refusing the cases above without being able to read the previous manifest; every later upgrade passes without it. A GitOps controller driving Helm shows the refusal as a failed release until the namespace is annotated.helm templateand pruning: protect the namespace in that tool first.helm get manifest | grep -c '^kind: Namespace', and a--dry-run=serverrender).Not verified
workflow_dispatchwithonly=first-install. Locally the script ran with images built from this tree.keepremoved from the namespace); the real pre-2.4.21 chart was only measured by hand.helm rollbackacross the change could not be measured cleanly: rolling back to a first revision already fails onmain(no MeshConfig with the name "default" found), unrelated to this change. The namespace kept its UID through the failed rollback and the next upgrade.restrictedenforcement was not tried, onlybaseline.🤖 Generated with Claude Code
https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr