Skip to content

Fix v3 CRD chart helm template commands for Kubernetes 1.36 - #3046

Merged
lwr20 merged 4 commits into
mainfrom
lwr20/helm-v3-crd-api-versions
Oct 1, 2026
Merged

lwr20 merged 4 commits into
mainfrom
lwr20/helm-v3-crd-api-versions

Conversation

@lwr20

@lwr20 lwr20 commented Sep 30, 2026

Copy link
Copy Markdown
Member

Product Version(s):
Calico OSS next, v3.33, v3.32; Calico Enterprise next.

Issue:
None. Found while reviewing tigera/banzai-core#1791 / #1793, which fixed the same bug in CI.

Link to docs preview:
TBD (preview build)

SME review:

  • An SME has approved this change.

DOCS review:

  • A member of the docs team has approved this change.

Additional information:

helm template is client-only, so the projectcalico.org.v3 chart can't see the cluster's APIs and renders MutatingAdmissionPolicy at v1beta1. Kubernetes 1.36 serves only v1, so those objects fail to apply.

  • --validate (next / v3.33 install pages) renders v1, but fails on any re-run: the kubectl-applied CRDs have no Helm ownership metadata, so Helm refuses with ... exists and cannot be imported into the current release. Removed.
  • No flag (v3.32 install pages, next / v3.33 upgrade note) renders v1beta1 and fails on 1.36.
  • Fix: a note to add --api-versions admissionregistration.k8s.io/v1/MutatingAdmissionPolicy on 1.36+. 1.34 / 1.35 keep the default. Same approach as calico-private's manifests/generate.sh.

Verified on kind (Kubernetes 1.36.1, Helm v3.16.2, published projectcalico/projectcalico.org.v3 v3.32.2):

Command Result
no flag MAP rendered at v1beta1
--validate, fresh cluster applies
--validate, re-run CustomResourceDefinition "bgpconfigurations.projectcalico.org" ... exists and cannot be imported into the current release
--api-versions ..., re-run applies

Not changed: CE 3.24-1 / 3.24-2 / 3.23-2. Those charts hard-code v1beta1 (no .Capabilities switch), so no flag helps; that needs a chart backport if 1.36 is supported there.

Merge checklist:

  • Deploy preview inspected wherever changes were made
  • Build completed successfully
  • Test have passed

🤖 Generated with Claude Code

Copilot AI balanced review requested due to automatic review settings September 30, 2026 09:08
@netlify

netlify Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for calico-docs-preview-next ready!

Name Link
🔨 Latest commit bf403aa
🔍 Latest deploy log https://app.netlify.com/projects/calico-docs-preview-next/deploys/6abe6757c17cb10007e83b20
😎 Deploy Preview https://deploy-preview-3046--calico-docs-preview-next.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify

netlify Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview succeeded!

Name Link
🔨 Latest commit bf403aa
🔍 Latest deploy log https://app.netlify.com/projects/tigera/deploys/6abe67578f72760008f380fc
😎 Deploy Preview https://deploy-preview-3046--tigera.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 97 (🟢 up 19 from production)
Accessibility: 98 (no change from production)
Best Practices: 92 (no change from production)
SEO: 100 (no change from production)
PWA: -
View the detailed breakdown and full score reports
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@ctauchen ctauchen left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for catching this. The --validate removal is clearly right and I would keep that part as is.

On the --api-versions note, I would suggest branching the step on Kubernetes version instead, the way the Manifest tab of native-v3-crds.mdx already does. Three reasons:

  • The Manifest tab on that same page already splits into "If your cluster is based on Kubernetes 1.36 or later" and "If your cluster is based on Kubernetes 1.34 or 1.35". With the note, the two tabs present the same decision in two different shapes.
  • There are only two branches to write. Native v3 CRDs require Kubernetes 1.34 or later, so there is no long tail of versions to enumerate.
  • Notes are skippable, and the penalty for skipping this one is a failed install with a no matches for kind "MutatingAdmissionPolicy" error. A fork in the steps has to be read.

The main reason is the point you raised in Slack. As written, the note is only correct while the chart's fallback stays v1beta1. If the chart default flips to v1, the unflagged command that 1.34 and 1.35 users run starts failing, and the note becomes wrong in the other direction. If both branches carry an explicit --api-versions, nothing depends on the chart default at all, and the docs stay correct whichever way you and Casey land that question. If the policies later move into the operator, the flag becomes redundant rather than wrong.

Branching also lets the explanation go away. "Without it, Helm renders the MutatingAdmissionPolicy resources at v1beta1" is chart internals in the middle of a how-to, and the Concepts section of native-v3-crds.mdx already covers the alpha to beta to GA progression for anyone who wants it.

Suggestions below for the five pages where the v3 chart is a step on the main path. Two things I have not suggested changes for, with reasons in the inline comments:

  • The 3.32 pages, where the v3 chart is a tech preview tip rather than a step. First question there is whether 3.32 claims Kubernetes 1.36 support at all.
  • kubernetes-upgrade.mdx, which needs a bigger cleanup than this PR should carry.

One thing to verify before merge: your kind testing covered the 1.36 half, but the 1.34 or 1.35 command with an explicit v1beta1 flag is new and unverified.

Also flagging that the tigera deploy preview failed on this PR, while calico-docs-preview-next passed.

Comment thread calico/getting-started/kubernetes/helm.mdx Outdated
Comment thread calico/operations/native-v3-crds.mdx Outdated
Comment thread calico_versioned_docs/version-3.33/getting-started/kubernetes/helm.mdx Outdated
Comment thread calico_versioned_docs/version-3.33/operations/native-v3-crds.mdx Outdated
Comment thread calico-enterprise/getting-started/install-on-clusters/kubernetes/helm.mdx Outdated
Comment thread calico_versioned_docs/version-3.32/getting-started/kubernetes/helm.mdx Outdated
Comment thread calico_versioned_docs/version-3.32/operations/native-v3-crds.mdx Outdated
Comment thread calico/operations/upgrading/kubernetes-upgrade.mdx
Copilot AI balanced review requested due to automatic review settings September 30, 2026 14:36

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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@ctauchen ctauchen left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

lwr20 and others added 2 commits October 1, 2026 14:19
helm template is client-only, so the projectcalico.org.v3 chart renders
MutatingAdmissionPolicy at v1beta1, which 1.36 does not serve. --validate
fixed the first install but fails any re-run: the kubectl-applied CRDs lack
Helm ownership metadata. Use --api-versions on 1.36+ instead.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Replace the --api-versions note with explicit 1.36+ and 1.34/1.35
commands so the docs don't depend on the chart's fallback default.

Co-authored-by: Christopher Tauchen <ctauchen@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@lwr20
lwr20 force-pushed the lwr20/helm-v3-crd-api-versions branch from ba0f4a9 to 35cb06c Compare October 1, 2026 13:20
Copilot AI balanced review requested due to automatic review settings October 1, 2026 13:20

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.

Copilot review overview

🟡 Changes recommended

Native-CRD prerequisite text still incorrectly states that Kubernetes 1.36 serves and requires v1beta1.

Review effort: Balanced
Findings: 4 Low severity

Open (4)

Comment thread calico/operations/native-v3-crds.mdx
Comment thread calico_versioned_docs/version-3.32/operations/native-v3-crds.mdx
Comment thread calico_versioned_docs/version-3.33/operations/native-v3-crds.mdx
The prerequisites said v1beta1 on every 1.34+ cluster, contradicting the
new 1.36 commands: 1.36 serves only v1.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 1, 2026 13:50
@lwr20

lwr20 commented Oct 1, 2026

Copy link
Copy Markdown
Member Author

Tested the 1.34/1.35 command on kind (Kubernetes 1.35.1, MutatingAdmissionPolicy gate + v1beta1 enabled, Helm v3.16.2, chart v3.32.2):

  • Renders MAPs at v1beta1; kubectl apply --server-side succeeds, and again on re-run.
  • MAPs actually default: a new NetworkPolicy got tier: default, the tier label, and types: [Ingress].
  • The 1.36 command on the same cluster fails (no matches for kind "MutatingAdmissionPolicy" in version "admissionregistration.k8s.io/v1"), so the split is needed.

tigera preview failure was a stale base; fixed by rebase.

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.

Copilot review overview

🔵 Needs a closer look

Four updated guides link MutatingAdmissionPolicies to the unrelated Validating Admission Policy reference.

Review effort: Balanced
Findings: None

Resolved since last review (4)
Previously missed (4)

In code that hasn't changed since last review

Low severity Link points to Validating instead of Mutating Admission Policy

calico-enterprise/​operations/​native-v3-crds.mdx:35

The link text names MutatingAdmissionPolicies, but its URL opens Kubernetes' Validating Admission Policy page. Point it to the Mutating Admission Policy reference so readers get the API and feature details described here.

Low severity Link points to Validating instead of Mutating Admission Policy

calico/​operations/​native-v3-crds.mdx:35

The link text names MutatingAdmissionPolicies, but its URL opens Kubernetes' Validating Admission Policy page. Point it to the Mutating Admission Policy reference so readers get the API and feature details described here.

Low severity Link points to Validating instead of Mutating Admission Policy

calico_versioned_docs/​version-3.32/​operations/​native-v3-crds.mdx:41

The link text names MutatingAdmissionPolicies, but its URL opens Kubernetes' Validating Admission Policy page. Point it to the Mutating Admission Policy reference so readers get the API and feature details described here.

Low severity Link points to Validating instead of Mutating Admission Policy

calico_versioned_docs/​version-3.33/​operations/​native-v3-crds.mdx:35

The link text names MutatingAdmissionPolicies, but its URL opens Kubernetes' Validating Admission Policy page. Point it to the Mutating Admission Policy reference so readers get the API and feature details described here.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 1, 2026 13:59

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.

Copilot review overview

🔵 Needs a closer look

The v3.32 manifest-based installation and migration paths still select unsupported admission-policy API versions.

Review effort: Balanced
Findings: None

Previously missed (3)

In code that hasn't changed since last review

Low severity Use a v1-rendered manifest for Kubernetes 1.36

calico_versioned_docs/​version-3.32/​getting-started/​kubernetes/​self-managed-onprem/​onpremises.mdx:138

This now says the v1 API is required on Kubernetes 1.36, but the v3.32 install step below still downloads manifests/calico-v3-crds.yaml. The published v3.32.2 file embeds every MutatingAdmissionPolicy and binding as admissionregistration.k8s.io/v1beta1, so kubectl apply fails on 1.36. Add a separate 1.36 path that uses a v1-rendered artifact (or explicitly limit this manifest installation method to 1.34–1.35).

This issue also appears on line 226 of the same file.

Low severity Split migration manifests by Kubernetes API version

calico_versioned_docs/​version-3.32/​operations/​crd-migration.mdx:56

The documented 1.34–1.35 path cannot follow this migration: v3.32.2's v3_projectcalico_org.yaml, applied at line 68, is generated with the v1 MutatingAdmissionPolicy capability and no v1beta1 counterpart is published. Those clusters therefore reject the first migration manifest. Split the command by Kubernetes version and provide a beta-rendered source for 1.34–1.35.

Low severity Provide beta-compatible manifests for Kubernetes 1.34–1.35

calico_versioned_docs/​version-3.32/​operations/​native-v3-crds.mdx:46

The manifest-install tab does not meet this 1.34–1.35 requirement. In v3.32.2, v3_projectcalico_org.yaml is generated with --api-versions admissionregistration.k8s.io/v1/MutatingAdmissionPolicy, and no v1beta1 variant is published, so the command at line 110 applies v1 resources that those clusters do not serve. Add a beta-compatible manifest path for 1.34–1.35 or restrict that tab to 1.36+.

@lwr20
lwr20 marked this pull request as ready for review October 1, 2026 14:22
@lwr20
lwr20 requested a review from a team as a code owner October 1, 2026 14:22
@lwr20
lwr20 merged commit 63ca329 into main Oct 1, 2026
12 checks passed
@lwr20
lwr20 deleted the lwr20/helm-v3-crd-api-versions branch October 1, 2026 14:23
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.

3 participants