Repository navigation
docs: the documented install commands no longer pass --create-namespace for a namespace the chart creates (#1384) - #1398
Merged
Merged
Conversation
…ce for a namespace the chart creates (#1384) With the chart default namespace.create=true, `--create-namespace` fails a first install (`namespaces "aether-system" already exists`). Dropping the flag alone fails too (`namespaces "aether-system" not found`: Helm stores the release in that namespace before the chart can create it), so the documented first install now creates the namespace empty with Helm's ownership metadata and the chart adopts and labels it. Both measured on kind with Helm 3.18.4. The chart and its default are unchanged. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
This was referenced Oct 8, 2026
Closed
bpalermo
marked this pull request as ready for review
October 8, 2026 13:19
There was a problem hiding this comment.
🔵 Needs a closer look
The draft explicitly requires maintainer confirmation of the manual namespace-adoption workflow before merging.
0 open findings
What changed in this PR
Updates Aether’s installation documentation to avoid the first-install namespace collision reported in #1384, without changing chart defaults.
Changes:
- Replaces
--create-namespacewith a first-install namespace preparation step using Helm ownership metadata. - Explains namespace ownership and Pod Security labeling responsibilities.
| File | Description |
|---|---|
| website/pages/index.md | Updates the website installation example. |
| README.md | Updates installation commands and links to guidance. |
| docs/runbook.md | Documents namespace preparation for first installs. |
| docs/getting-started.md | Adds namespace preparation and explains Helm adoption. |
| docs/configuration.md | Clarifies namespace.create behavior. |
| charts/README.md | Updates installation and namespace ownership guidance. |
🧠 Review effort: Balanced
Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.
bpalermo
added a commit
that referenced
this pull request
Oct 8, 2026
…recovering from a failed first install (#1403, #1406) Replaces the namespace-adoption pre-step of #1398 everywhere it appeared with the namespace and its pod-security labels, adds the runbook section on recovering from a failed first install, and a "Chart 2.4.21" note with the check to run before and after the upgrade. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
bpalermo
added a commit
that referenced
this pull request
Oct 9, 2026
…t no longer creates the release's own namespace by default (#1403, #1404, #1405, #1406) (#1464) * fix(chart): the chart no longer creates the release's own namespace by 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 * test(e2e): a nightly job installs the charts the way the docs say, with 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 * docs: the first install is one helm command with --create-namespace; recovering from a failed first install (#1403, #1406) Replaces the namespace-adoption pre-step of #1398 everywhere it appeared with the namespace and its pod-security labels, adds the runbook section on recovering from a failed first install, and a "Chart 2.4.21" note with the check to run before and after the upgrade. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr * docs(chart): a late namespace label is followed by a rollout restart of the DaemonSets (#1406) Measured on kind: four minutes after the pods were first refused, labelling the namespace did not bring them back within 20 s; `rollout restart daemonset` did at once. The runbook, getting-started and the install notes say so. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr * test(e2e): the failed-first-install guard is exercised for both charts; 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 * fix(chart): the prober chart reads the namespace from the cluster on 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 * fix(chart): a retry of a failed first install that still asks for namespace.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 * fix(chart): an upgrade leaves the Namespace out only when the chart can 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 * fix(chart): moving a release to another namespace cannot leave an owned 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 --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 #1384
Opened as a draft on purpose: the fix the issue assumed (just drop
--create-namespace) does not work, so this documents one extra step. Please confirm that is the form you want before it merges. An agent wrote this.What was wrong
Every documented install of the
aetherchart passed--create-namespacewhile the chart's defaultnamespace.create=truealso renders theNamespace. On a first install Helm creates the namespace, then the chart tries to create it again.What I measured (kind v0.33.0, node
kindest/node:v1.35.8, Helm 3.18.4, chart 2.4.16 from this tree)Fresh cluster,
aether-crdsinstalled,aether-systemabsent before each row.helm upgrade --install aether … -n aether-system --create-namespace(the documented form)Error: 1 error occurred: * namespaces "aether-system" already exists; release leftfailed, namespace left without pod-security labels--create-namespaceError: create: failed to create: namespaces "aether-system" not foundkubectl create namespace aether-system, then no flagNamespace "aether-system" … exists and cannot be imported into the current release: invalid ownership metadataapp.kubernetes.io/managed-by=Helm+meta.helm.sh/release-name/release-namespace, then no flagpod-security.kubernetes.io/{enforce,audit,warn}=privileged; a second run (upgrade) works;helm installworks the same--create-namespace --set namespace.create=false--set namespace.create=falsewithout the flagnamespaces "aether-system" not foundSo with the chart default, no single
helmcommand installs into a namespace that does not exist yet: Helm stores the release record in the release namespace before it creates anything the chart renders.What changed (docs only; the chart and its default are untouched)
docs/getting-started.md(where the install is first documented): the flag is gone, a "first install only" step creates the namespace with Helm's ownership metadata, and a paragraph says the chart owns the namespace, why (the privileged pod-security labels), and why the flag is absent.README.md,charts/README.md,docs/runbook.md("Deploying a specific build"),website/pages/index.md: same command shape.charts/README.md, "Multiple instances & labels": the old text offered[--create-namespace]ornamespace.create=trueas if either worked. Replaced by a short "who creates the namespace" table covering both settings, including the reverse case (namespace.create=falsekeeps--create-namespaceor you create the namespace, and nothing sets the pod-security label for you).docs/configuration.md: thenamespace.createrow says the same.Other commands checked and left alone:
aether-crdscommands pass no namespace flag; the chart renders noNamespace.charts/prober:namespace.createdefaults tofalseand no documented command installs it with the flag.charts/udsechohas noNamespacetemplate.helm upgrade aether … -n aether-system) never had the flag.e2e/*.shand.github/actions/run-conformancepass--create-namespacetogether with--set namespace.create=false, which is the working pair. Not changed.docs/proposals/is history. Not changed.Checks
bazel test //website:site_testpasses.make format-checkclean;bazel build --config=lint --@aspect_rules_lint//lint:fail_on_violation //...succeeds.scripts/check-chart-version-bump.sh origin/mainpasses (charts/README.mdis not inside a chart, so no bump).helm template: default renders oneNamespace;namespace.create=falserenders none.Not verified
The alternative, if you prefer it
Ship
namespace.create=falseas the documented path instead: create the namespace with the pod-security labels by hand (or--create-namespaceplus akubectl label), and keep the chart out of it. That needs no ownership metadata, but then the chart does not own the namespace. A chart change (not in scope here) could remove the extra step altogether.🤖 Generated with Claude Code
https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr