Skip to content

Conversation

marc1404
Copy link
Member

@marc1404 marc1404 commented Jul 31, 2025

How to categorize this PR?

/area usability quality
/kind bug

What this PR does / why we need it:

This PR maintains the feature gate ValidatingAdmissionPolicy as removed with Kubernetes v1.32.
Otherwise, the kube-apiserver crashes when trying to enable this feature gate with Kubernetes versions >= v1.32.

Which issue(s) this PR fixes:

Follow-up to: #11020

Special notes for your reviewer:

/cc @LucaBernstein @vpnachev

Thanks for bringing this to our attention @vpnachev! 🙏

We sanity checked the list of added and removed feature gates in the Kubernetes version v1.32 against the code, but did not identify further issues.

Release note:

The Kubernetes feature gate `ValidatingAdmissionPolicy` is now marked as removed in Kubernetes 1.32. Previously, it was possible to upgrade a Shoot cluster to Kubernetes 1.32 with this feature gate enabled, which resulted in kube-apiserver failing to start due to an unrecognized feature gate.

…Kubernetes v1.32

Co-authored-by: Luca Bernstein <luca.bernstein@sap.com>
@gardener-prow gardener-prow bot added area/usability Usability related area/quality Output qualification (tests, checks, scans, automation in general, etc.) related kind/bug Bug cla: yes Indicates the PR's author has signed the cla-assistant.io CLA. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jul 31, 2025
Copy link
Member

@LucaBernstein LucaBernstein left a comment

Choose a reason for hiding this comment

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

/approve

@gardener-prow gardener-prow bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 31, 2025
Copy link
Member

@vpnachev vpnachev left a comment

Choose a reason for hiding this comment

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

/lgtm

@gardener-prow gardener-prow bot added the lgtm Indicates that a PR is ready to be merged. label Jul 31, 2025
@vpnachev
Copy link
Member

/cherry-pick release-v1.124

@vpnachev
Copy link
Member

/cherry-pick release-v1.123

@gardener-ci-robot
Copy link
Contributor

@vpnachev: once the present PR merges, I will cherry-pick it on top of release-v1.124 in a new PR and assign it to you.

In response to this:

/cherry-pick release-v1.124

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@gardener-ci-robot
Copy link
Contributor

@vpnachev: once the present PR merges, I will cherry-pick it on top of release-v1.123 in a new PR and assign it to you.

In response to this:

/cherry-pick release-v1.123

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@vpnachev
Copy link
Member

/cherry-pick release-v1.122

@gardener-ci-robot
Copy link
Contributor

@vpnachev: once the present PR merges, I will cherry-pick it on top of release-v1.122 in a new PR and assign it to you.

In response to this:

/cherry-pick release-v1.122

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@ialidzhikov
Copy link
Member

Release note??

@@ -299,7 +299,7 @@ var featureGateVersionRanges = map[string]*FeatureGateVersionRange{
"UserNamespacesPodSecurityStandards": {VersionRange: versionutils.VersionRange{AddedInVersion: "1.29"}},
"UserNamespacesStatelessPodsSupport": {VersionRange: versionutils.VersionRange{RemovedInVersion: "1.28"}},
"UserNamespacesSupport": {VersionRange: versionutils.VersionRange{AddedInVersion: "1.28"}},
"ValidatingAdmissionPolicy": {LockedValue: true, LockedToDefaultInVersion: "1.30"},
"ValidatingAdmissionPolicy": {LockedValue: true, LockedToDefaultInVersion: "1.30", VersionRange: versionutils.VersionRange{RemovedInVersion: "1.32"}},
Copy link
Member

Choose a reason for hiding this comment

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

Don't we need to maintain also AddedInVersion?

Copy link
Member Author

Choose a reason for hiding this comment

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

We only maintain this field if we need to ensure a lower Kubernetes version constraint (as can be seen in line 300 above the change).
The feature gate has been added with Kubernetes v1.26 (ref).

Copy link
Member

Choose a reason for hiding this comment

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

I see that it is not very consistent at the moment. @shafeeqes also concluded the same #12486 (comment).

I prefer maintaining the versions despite that they the corresponding Kubernetes versions are no longer supported by Gardener. It makes it obvious to the reader when the feature gate was added and we make sure that we don't miss to maintain it.

Anyways, let's do not block this PR because of this. We can agree outside of this PR and write down the agreement/convention.

Copy link
Member Author

Choose a reason for hiding this comment

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

Based on a gut feeling, I'd probably also prefer a more consistent approach. As you've said, we didn't want to pollute this PR with changing other feature gate definitions as well.

@gardener-prow gardener-prow bot removed the lgtm Indicates that a PR is ready to be merged. label Jul 31, 2025
@gardener-prow gardener-prow bot requested a review from vpnachev July 31, 2025 13:14
@marc1404
Copy link
Member Author

Release note??

@ialidzhikov we were debating whether to add a release note or not. It's added now, thanks :)

@ialidzhikov
Copy link
Member

@ialidzhikov we were debating whether to add a release note or not. It's added now, thanks :)

Thanks! We are cherry-picking the fix, hence it deserve a release note IMO. :)

@marc1404
Copy link
Member Author

Test Integration ResourceManager NodeAgentAuthorizer Suite: [It] NodeAgentAuthorizer tests when machine namespace is unset #Leases #list forbid other gardener-node-agent

[FAILED] Expected success, but got an error:
    <*net.OpError | 0xc0019b14a0>: 
    listen tcp 127.0.0.1:41719: bind: address already in use
    {
        Op: "listen",
        Net: "tcp",
        Source: nil,
        Addr: <*net.TCPAddr | 0xc001ba19b0>{
            IP: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 127, 0, 0, 1],
            Port: 41719,
            Zone: "",
        },
        Err: <*os.SyscallError | 0xc00041b920>{
            Syscall: "bind",
            Err: <syscall.Errno>0x62,
        },
    }
In [BeforeEach] at: /home/prow/go/src/github.com/gardener/gardener/test/integration/resourcemanager/nodeagentauthorizer/nodeagentauthorizer_test.go:94 @ 07/31/25

/test pull-gardener-integration

Copy link
Member

@ialidzhikov ialidzhikov left a comment

Choose a reason for hiding this comment

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

/lgtm

@gardener-prow gardener-prow bot added the lgtm Indicates that a PR is ready to be merged. label Jul 31, 2025
Copy link
Contributor

gardener-prow bot commented Jul 31, 2025

LGTM label has been added.

Git tree hash: f70fdb030f98fbbc4dcdf17c2d27d979017b1d92

Copy link
Contributor

gardener-prow bot commented Jul 31, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ialidzhikov, LucaBernstein

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [LucaBernstein,ialidzhikov]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@gardener-prow gardener-prow bot merged commit 08919f0 into gardener:master Jul 31, 2025
19 checks passed
@gardener-ci-robot
Copy link
Contributor

@vpnachev: new pull request created: #12645

In response to this:

/cherry-pick release-v1.124

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@gardener-ci-robot
Copy link
Contributor

@vpnachev: new pull request created: #12646

In response to this:

/cherry-pick release-v1.123

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@gardener-ci-robot
Copy link
Contributor

@vpnachev: #12643 failed to apply on top of branch "release-v1.122":

Applying: fix: Maintain feature gate ValidatingAdmissionPolicy as removed with Kubernetes v1.32
Using index info to reconstruct a base tree...
M	pkg/utils/validation/features/featuregates.go
Falling back to patching base and 3-way merge...
Auto-merging pkg/utils/validation/features/featuregates.go
CONFLICT (content): Merge conflict in pkg/utils/validation/features/featuregates.go
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config set advice.mergeConflict false"
Patch failed at 0001 fix: Maintain feature gate ValidatingAdmissionPolicy as removed with Kubernetes v1.32

In response to this:

/cherry-pick release-v1.122

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@marc1404 marc1404 deleted the fix/11020-remove-validationadmissionpolicy-featuregate-k8s-v1.32 branch July 31, 2025 14:59
marc1404 added a commit to marc1404/gardener that referenced this pull request Jul 31, 2025
…Kubernetes v1.32 (gardener#12643)

Co-authored-by: Luca Bernstein <luca.bernstein@sap.com>

(cherry picked from commit 08919f0)
marc1404 added a commit to marc1404/gardener that referenced this pull request Jul 31, 2025
…Kubernetes v1.32 (gardener#12643)

Co-authored-by: Luca Bernstein <luca.bernstein@sap.com>

(cherry picked from commit 08919f0)
gardener-prow bot pushed a commit that referenced this pull request Jul 31, 2025
…Kubernetes v1.32 (#12643) (#12651)

Co-authored-by: Luca Bernstein <luca.bernstein@sap.com>

(cherry picked from commit 08919f0)
Duciwuci pushed a commit to stackitcloud/gardener that referenced this pull request Sep 1, 2025
…Kubernetes v1.32 (gardener#12643)

Co-authored-by: Luca Bernstein <luca.bernstein@sap.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/quality Output qualification (tests, checks, scans, automation in general, etc.) related area/usability Usability related cla: yes Indicates the PR's author has signed the cla-assistant.io CLA. kind/bug Bug lgtm Indicates that a PR is ready to be merged. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants