Skip to content

chart: under Helm 4 server-side apply the MeshConfig seed hook is not create-only #1542

Closed as not planned

Description

@bpalermo

Since #1513 the seeded MeshConfig is a pre-install/pre-upgrade hook with helm.sh/hook-delete-policy: never. The value is one Helm does not know: any value turns off the default before-hook-creation, and Helm 3 and 4 act only on the three they know, so nothing is ever deleted. That is read from pkg/action/hooks.go and measured on Helm 3.18.4 and 4.2.0, but it is not documented behaviour.

What remains, measured on Helm 4.2.0 with server-side apply: when an upgrade is reseeding (the object was absent at render) and a MeshConfig named default is created before the hook runs, the seed is merged into that object. With a non-empty meshConfig.proxy in the values, the fields the seed sets are added to it (same UID, exit 0); a conflicting field fails the upgrade and leaves the object untouched. With the default empty seed nothing in the spec changes. Helm 3 fails with already exists, touches nothing, and a re-run succeeds.

The window needs an object to be absent at render and created during the same upgrade. A mechanism that is create-only on every Helm version is a hook Job that creates the object only when it is absent, which costs a workload with its own ServiceAccount, RBAC and image.

Also to settle here: whether to keep relying on the unknown policy value, and how GitOps tools that render the chart treat it (not tried).

Found while reviewing #1513.

🤖 Generated with Claude Code

https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr

Activity

  1. added
    bug
    minor
    chart
    on Oct 9, 2026
  2. bpalermo commented on Oct 9, 2026

    @bpalermo
    OwnerAuthor

    Measured for #1567 at the API-server level (not through Helm 4 end to end): a fixed metadata.uid in the seed is a dead end (a creating apply is refused with uid mismatch). A ValidatingAdmissionPolicy on UPDATE of meshconfigs that denies adding helm.sh/hook to an object lacking it does make the seed create-only: a seed over an operator's object is denied and the object untouched, a creating apply passes, ordinary edits pass. Cost: two cluster-scoped admission objects in every install, and no cover for the upgrade that introduces it. That is a decision for the owner; nothing was changed.

    🤖 Generated with Claude Code

    https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr

  3. bpalermo commented on Oct 10, 2026

    @bpalermo
    OwnerAuthor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugchartminor

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions