Skip to content

Update API version of AdmissionResponse created via invalid call#1905

Merged
clux merged 1 commit into
kube-rs:mainfrom
Magicloud:admission_api_version
Jan 17, 2026
Merged

Update API version of AdmissionResponse created via invalid call#1905
clux merged 1 commit into
kube-rs:mainfrom
Magicloud:admission_api_version

Conversation

@Magicloud
Copy link
Copy Markdown
Contributor

The API version is hardcoded to v1beta1, which is obsoleted since K8S v1.22. Giving v1.22 is not supported by kube-rs. Simply update the version is alright.

Motivation

Fix #1904

Solution

The API versions v1 and v1beta1 are defined in two consts. Update the only place that uses them from v1beta1 to v1, and remove the v1beta1 const. Building passed indicates that there is no other place using v1beta1 const.

@codecov
Copy link
Copy Markdown

codecov Bot commented Jan 17, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 76.1%. Comparing base (5462860) to head (95bbdc6).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##            main   #1905     +/-   ##
=======================================
+ Coverage   76.1%   76.1%   +0.1%     
=======================================
  Files         86      86             
  Lines       8399    8399             
=======================================
+ Hits        6388    6389      +1     
+ Misses      2011    2010      -1     
Files with missing lines Coverage Δ
kube-core/src/admission.rs 61.2% <ø> (ø)

... and 3 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Magicloud Magicloud force-pushed the admission_api_version branch from 7f25593 to b0705ba Compare January 17, 2026 12:49
The API version is hardcoded to v1beta1, which is obsoleted since K8S
v1.22. Giving v1.22 is not supported by kube-rs. Simply update the
version is alright.

The API versions v1 and v1beta1 are defined in two consts. Update the
only place that uses them from v1beta1 to v1, and remove the v1beta1
const. Building passed indicates that there is no other place using
v1beta1 const.

Signed-off-by: Magicloud <[email protected]>
@Magicloud Magicloud force-pushed the admission_api_version branch from b0705ba to 95bbdc6 Compare January 17, 2026 13:23
@clux clux added the changelog-fix changelog fix category for prs label Jan 17, 2026
Copy link
Copy Markdown
Member

@clux clux left a comment

Choose a reason for hiding this comment

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

Thank you!

@clux clux merged commit f02cf6e into kube-rs:main Jan 17, 2026
17 checks passed
@clux clux added this to the 3.0.1 milestone Jan 21, 2026
hugoponthieu pushed a commit to hugoponthieu/kube that referenced this pull request Jan 29, 2026
…e-rs#1905)

The API version is hardcoded to v1beta1, which is obsoleted since K8S
v1.22. Giving v1.22 is not supported by kube-rs. Simply update the
version is alright.

The API versions v1 and v1beta1 are defined in two consts. Update the
only place that uses them from v1beta1 to v1, and remove the v1beta1
const. Building passed indicates that there is no other place using
v1beta1 const.

Signed-off-by: Magicloud <[email protected]>
cchndl pushed a commit to cchndl/kube that referenced this pull request Feb 19, 2026
…e-rs#1905)

The API version is hardcoded to v1beta1, which is obsoleted since K8S
v1.22. Giving v1.22 is not supported by kube-rs. Simply update the
version is alright.

The API versions v1 and v1beta1 are defined in two consts. Update the
only place that uses them from v1beta1 to v1, and remove the v1beta1
const. Building passed indicates that there is no other place using
v1beta1 const.

Signed-off-by: Magicloud <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog-fix changelog fix category for prs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AdmissionResponse::invalide causing issue in K3S 1.34.3

2 participants