Skip to content

Add known issues when downgrading from Calico 3.34 - #3284

Open
fasaxc wants to merge 5 commits into
mainfrom
downgrade-known-issues-334
Open

fasaxc wants to merge 5 commits into
mainfrom
downgrade-known-issues-334

Conversation

@fasaxc

@fasaxc fasaxc commented Dec 4, 2026 •

Copy link
Copy Markdown
Member

Product Version(s):
Calico Open Source 3.34 (next).

Issue:
https://tigera.atlassian.net/browse/CORE-14020
https://tigera.atlassian.net/browse/CORE-14037

Link to docs preview:
https://deploy-preview-3284--calico-docs-preview-next.netlify.app/calico/next/operations/upgrading/upgrade-notes#known-issues-when-downgrading-from-calico-334-to-an-earlier-version

SME review:

  • An SME has approved this change.

DOCS review:

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

Additional information:

Adds "Known issues when downgrading from Calico 3.34 to an earlier version" at the bottom of the upgrade notes, as the docs team suggested. It explains two blockers:

  1. ClusterNetworkPolicy CRD. 3.34 ships the network-policy-api v0.3.1 CRD, which stores v1beta1. The API server then refuses the earlier v1alpha2-only CRD because v1beta1 is in status.storedVersions.
  2. protect-cni-annotations VAP. The earlier release rewrites the CNI ClusterRole without the cniannotations grant but leaves the 3.34 VAP in place, so every pod sandbox create/delete is denied.

It then gives one procedure that fixes both before the downgrade: scale the operator to 0, switch the CRD's storage to v1alpha2, rewrite every CNP in place so it is stored as v1alpha2 (they stay enforced throughout), prune storedVersions, delete the admission policies 3.34 installs (protect-cni-annotations and protect-aws-vpc-annotations VAPs, and the strip-cni-annotations MAP where served) with their bindings, then downgrade with the earlier manifests or Helm chart and check the operator is running.

The in-place migration is safe across the downgrade: 3.34's v1alpha2 schema is 3.33's minus destinationNamedPort and with a stricter CIDR rule, so every policy 3.34 accepts is valid under 3.33.

AI assistance: Claude Code drafted the section from the two Jira tickets and checked details against release-v3.34: the CRD version order, that the v1alpha2 and v1beta1 schemas in the v0.3.1 CRD are identical with no conversion webhook, and that the manifest installs ship the same VAP.

Merge checklist:

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

Document the two manual steps a 3.34 -> earlier downgrade needs: pruning
v1beta1 from the ClusterNetworkPolicy CRD's storedVersions, and deleting
the protect-cni-annotations.projectcalico.org ValidatingAdmissionPolicy
that the earlier release leaves behind.
Copilot AI lite review requested due to automatic review settings December 4, 2026 15:57
@netlify

netlify Bot commented Dec 4, 2026 •

Copy link
Copy Markdown

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

Name Link
🔨 Latest commit c993417
🔍 Latest deploy log https://app.netlify.com/projects/calico-docs-preview-next/deploys/6b12eb05392210ed1297e135
😎 Deploy Preview https://deploy-preview-3284--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 Dec 4, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview succeeded!

Name Link
🔨 Latest commit c993417
🔍 Latest deploy log https://app.netlify.com/projects/tigera/deploys/6b12eb05fb3cd76fe8b52015
😎 Deploy Preview https://deploy-preview-3284--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: 85 (🔴 down 6 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.

🟡 Changes recommended

The upgrade guide’s rollback procedure is unreliable for Helm-managed installations because applying older manifests may leave the newer operator/CNI active, so the downgrade steps need revision.

1 open issue
What changed in this PR

Adds Calico 3.34 downgrade guidance for CRD storage-version conflicts and lingering CNI admission policies.

Changes:

  • Documents the ClusterNetworkPolicy CRD workaround.
  • Documents removal of the stale CNI ValidatingAdmissionPolicy and binding.
  • Provides policy backup and restoration steps.
File Description
calico/​operations/​upgrading/​upgrade-notes.mdx Adds known downgrade issues and remediation steps for the ClusterNetworkPolicy CRD and CNI admission policy.

Review effort: Lite

Scale the operator to 0, fix the CRD and delete the VAP before applying
the earlier manifests, so pods are never blocked during the downgrade.
@fasaxc
fasaxc marked this pull request as ready for review December 4, 2026 16:05
@fasaxc
fasaxc requested a review from a team as a code owner December 4, 2026 16:05
Rewriting each policy after switching storage to v1alpha2 keeps them
enforced throughout. Replace the replica-count claim with a check.

@lwr20 lwr20 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM. Tested c993417 end to end on kind (k8s 1.36.4): v3.33.1 → v3.34 (dev-6015) → steps 1–6 → v3.33.1, once with the operator manifests and once with Helm and the v3.3x CRD charts. Every command worked as written. The v3.33 CRD applied cleanly, the operator came back by itself, and new pods start and delete normally after the downgrade. The ClusterNetworkPolicies kept their UIDs and stayed enforced throughout. Not tested on EKS with the AWS VPC CNI.

Nit (non-blocking): right after the CRD downgrade, kubectl get clusternetworkpolicies can return NotFound until kubectl's discovery cache refreshes. A one-line note might save someone a scare.

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