Use the correct API version for MutatingAdmissionPolicy#1770
Use the correct API version for MutatingAdmissionPolicy#1770DockToFuture wants to merge 1 commit intogardener:masterfrom
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
… v1 in K8s >= 1.36
e8b681a to
774d6f1
Compare
|
This change enhances the Kubernetes MutatingAdmissionPolicy support by implementing version-aware API compatibility across different Kubernetes releases. The modification dynamically selects the appropriate API version (v1alpha1, v1beta1, or v1) based on the cluster's Kubernetes version and configuration, ensuring proper functionality as the MutatingAdmissionPolicy feature progresses from alpha to beta to GA status in different Kubernetes versions. Walkthrough
Model: claude-sonnet-4-20250514 | Prompt Tokens: 6282 | Completion Tokens: 257 |
How to categorize this PR?
/area networking
/kind enhancement
/platform aws
What this PR does / why we need it:
MutatingAdmissionPolicy graduates from v1alpha1 → v1beta1 in Kubernetes 1.34 and to v1 (GA) in 1.36. This PR makes the Calico mutating admission policy chart use the correct API version based on the shoot's Kubernetes version, and aligns the enable/disable logic accordingly:
< 1.34: v1alpha1, requires explicit feature gate + RuntimeConfig opt-in>= 1.34: v1beta1, enabled by default (can be opted out)>= 1.36: v1, always enabled (feature gate locked on)Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Release note: