Skip to content

[release-v1.42] Manage ValidatingAdmissionPolicies in admission imports (#4878)#4943

Open
lucastigera wants to merge 2 commits into
tigera:release-v1.42from
lucastigera:backport-4878-vap-v1.42
Open

[release-v1.42] Manage ValidatingAdmissionPolicies in admission imports (#4878)#4943
lucastigera wants to merge 2 commits into
tigera:release-v1.42from
lucastigera:backport-4878-vap-v1.42

Conversation

@lucastigera

Copy link
Copy Markdown
Contributor

Backport of #4878 to release-v1.42

Backports #4878 ("Manage ValidatingAdmissionPolicies in admission imports").

Why

Operator builds whose embedded admission set is synced from calico release-v3.32 panic at startup:

panic: Failed to parse admission policy protect-builtin-tiers.yaml:
unexpected kind "ValidatingAdmissionPolicy" in protect-builtin-tiers.yaml

Calico now ships a ValidatingAdmissionPolicy at api/admission/protect-builtin-tiers.yaml (OSS via projectcalico/calico#12982). The operator copies api/admission/* into its embedded set, but the v1.42 admission-import code only knows how to parse MutatingAdmissionPolicy kinds, so it panics on the VAP instead of managing it. #4878 teaches the operator to parse/skip unknown kinds and to bootstrap + reconcile the VAP and its binding, discovering the served API version independently.

Changes

  • Cherry-pick of Manage ValidatingAdmissionPolicies in admission imports #4878 (-x), adapted for v1.42: the enterprise ProductVariant constant here is opv1.TigeraSecureEnterprise (master uses CalicoEnterprise).
  • gen-versions sync of the bundled pkg/imports CRDs/admission policies, with libcalico-go pinned at the release-v3.32 (OSS) / release-calient-v3.23 (enterprise) branches so the VAP manifests are pulled in.

⚠️ CI is expected to be RED — do not merge yet

validate-gen-versions / dirty-check will fail until tigera/calico-private#12356 lands. That PR moves the enterprise protect-builtin-tiers.yaml from api/config/admission/ to api/admission/ on release-calient-v3.23 (the wire-up commit #12159 was never backported to that branch). Until it merges, make gen-versions deletes the enterprise manifest, producing a dirty diff. The enterprise protect-builtin-tiers.yaml is kept manually here in the meantime; gen-versions will own it once #12356 merges.

Tests pass locally:

  • pkg/imports/admission — 13/13
  • pkg/controller/installation (VAP-focused) — 7/7

Related

caseydavenport and others added 2 commits June 17, 2026 21:52
The admission import directory now carries a ValidatingAdmissionPolicy
(protect-builtin-tiers) alongside the MAPs. Parse non-MutatingAdmissionPolicy
kinds and manage the VAP + binding, discovering its served API version
independently. Without this, operator builds whose embedded admission set is
synced from calico release-v3.32 (which ships protect-builtin-tiers.yaml via
projectcalico/calico#12982) panic at startup with:
  unexpected kind "ValidatingAdmissionPolicy" in protect-builtin-tiers.yaml

Backport of tigera#4878 to release-v1.42. Adapted for v1.42: the enterprise
ProductVariant constant is opv1.TigeraSecureEnterprise (not CalicoEnterprise).

(cherry picked from commit eeb4d80)
…sions

Point libcalico-go in calico_versions.yml and enterprise_versions.yml at the
release-v3.32 (OSS) and release-calient-v3.23 (enterprise) branches so
gen-versions pulls the protect-builtin-tiers ValidatingAdmissionPolicy, and
regenerate the bundled pkg/imports manifests to match.

Note: the enterprise protect-builtin-tiers.yaml is kept manually until
tigera/calico-private#12356 moves it into api/admission/ on the release
branch; gen-versions will own it once that merges.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants