Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ Updates for Kubernetes v1.32.0 #3302

Open
wants to merge 20 commits into
base: main
Choose a base branch
from

Conversation

gman0
Copy link
Contributor

@gman0 gman0 commented Feb 14, 2025

Summary

This PR updates dependencies to be in line with k8s v1.32.0.

Warning! Do not merge before we sort out our k8s rebase and update deps in this PR.

Related issue(s)

Fixes #3209

Release Notes

Updated dependencies to be in line with k8s v1.32.0

@kcp-ci-bot kcp-ci-bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. release-note Denotes a PR that will be considered when it comes time to generate release notes. labels Feb 14, 2025
@kcp-ci-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign embik for approval. For more information see the Kubernetes Code Review Process.

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

Needs approval from an approver in each of these files:

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

@kcp-ci-bot kcp-ci-bot added kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Feb 14, 2025
@kcp-ci-bot
Copy link
Contributor

Hi @gman0. Thanks for your PR.

I'm waiting for a kcp-dev member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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/test-infra repository.

@kcp-ci-bot kcp-ci-bot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. dco-signoff: no Indicates the PR's author has not signed the DCO. labels Feb 14, 2025
@gman0 gman0 force-pushed the 1.32-bump-pre.2-clean branch from 9fbd890 to 41067a0 Compare February 14, 2025 23:36
@kcp-ci-bot kcp-ci-bot added dco-signoff: yes Indicates the PR's author has signed the DCO. and removed dco-signoff: no Indicates the PR's author has not signed the DCO. labels Feb 14, 2025
Copy link
Contributor

@mjudeikis mjudeikis left a comment

Choose a reason for hiding this comment

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

looks quite clean

@mjudeikis mjudeikis changed the title DO NOT MERGE: ✨ Updates for Kubernetes v1.32.0 ✨ Updates for Kubernetes v1.32.0 Feb 16, 2025
@mjudeikis
Copy link
Contributor

It's in a draft state, we are not gonna merge :) but removing prefixes allows CI to run with a cleaner signal

@mjudeikis
Copy link
Contributor

/test all

garbagecollector.Run now requires an intial timeout argument.

On-behalf-of: SAP [email protected]
Signed-off-by: Robert Vasek <[email protected]>
@gman0
Copy link
Contributor Author

gman0 commented Feb 17, 2025

The following error comes up in pull-kcp-build-image, pull-kcp-verify, pull-kcp-verify-codegen, pull-kcp-test-e2e and pull-kcp-test-e2e-multiple-runs:

[1/2] STEP 14/18: RUN --mount=type=cache,target=/go/pkg/mod     go mod download
go: k8s.io/[email protected] (replaced by github.com/kcp-dev/kubernetes/staging/src/k8s.io/[email protected]): reading https://proxy.golang.org/github.com/kcp-dev/kubernetes/staging/src/k8s.io/component-helpers/@v/v0.0.0-20250212172239-c6ebc5941362.mod: 404 Not Found
	server response: not found: fetch timed out

But https://proxy.golang.org/github.com/kcp-dev/kubernetes/staging/src/k8s.io/component-helpers/@v/v0.0.0-20250212172239-c6ebc5941362.mod looks ok. Will re-run.

@gman0
Copy link
Contributor Author

gman0 commented Feb 17, 2025

/test pull-kcp-build-image

@kcp-ci-bot
Copy link
Contributor

@gman0: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/test pull-kcp-build-image

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/test-infra repository.

@mjudeikis
Copy link
Contributor

/ok-to-test

@kcp-ci-bot kcp-ci-bot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Feb 17, 2025
@gman0 gman0 force-pushed the 1.32-bump-pre.2-clean branch from 41067a0 to 1113f20 Compare February 17, 2025 09:42
@gman0
Copy link
Contributor Author

gman0 commented Feb 17, 2025

/test pull-kcp-lint

gman0 added 12 commits February 17, 2025 14:20
The feature gate is now stable and removed.

See kubernetes/kubernetes#126645

On-behalf-of: SAP [email protected]
Signed-off-by: Robert Vasek <[email protected]>
…mplete

k8s.io/kubernetes/pkg/controplane/apiserver/options.Complete() has a different
signature that includes a ctx and cmd flags, and so we need to wire these to
its callers.

On-behalf-of: SAP [email protected]
Signed-off-by: Robert Vasek <[email protected]>
…ount-signing-endpoint

On-behalf-of: SAP [email protected]
Signed-off-by: Robert Vasek <[email protected]>
coordination.k8s.io/v1alpha2 replaced v1alpha1, see k/k#127857.

On-behalf-of: SAP [email protected]
Signed-off-by: Robert Vasek <[email protected]>
…rmers

MutatingAdmissionPolicy is in admissionregistration.k8s.io/v1alpha1
and disabled by default in Kubernetes v1.32. However, we're overriding
admissionregistration.k8s.io/v1alpha1 to be enabled until next release,
which means MAP is also served and we need to create informers for it.

On-behalf-of: SAP [email protected]
Signed-off-by: Robert Vasek <[email protected]>
…PIExport builtin types

MutatingAdmissionPolicy is in admissionregistration.k8s.io/v1alpha1
and disabled by default in Kubernetes v1.32. However, we're overriding
admissionregistration.k8s.io/v1alpha1 to be enabled until next release,
which means MAP is also served and we need to expose it.

On-behalf-of: SAP [email protected]
Signed-off-by: Robert Vasek <[email protected]>
Kubernetes v1.32 implicitly removes ValidatingAdmissionPolicy and
ValidatingAdmissionPolicyBinding from admissionregistration.k8s.io/v1alpha
in accordance with APILifecycle policy.

This commit removes the relevant CRDs, informers and APIExport builtin types.

On-behalf-of: SAP [email protected]
Signed-off-by: Robert Vasek <[email protected]>
…on.k8s.io/v1alpha1 override

On-behalf-of: SAP [email protected]
Signed-off-by: Robert Vasek <[email protected]>
@gman0 gman0 force-pushed the 1.32-bump-pre.2-clean branch from 1113f20 to 6d4ca80 Compare February 17, 2025 13:21
@mjudeikis mjudeikis marked this pull request as ready for review February 18, 2025 06:24
@kcp-ci-bot kcp-ci-bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 18, 2025
@kcp-ci-bot
Copy link
Contributor

@gman0: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-kcp-test-e2e-shared 6d4ca80 link true /test pull-kcp-test-e2e-shared
pull-kcp-test-e2e-sharded 6d4ca80 link true /test pull-kcp-test-e2e-sharded
pull-kcp-test-e2e-multiple-runs 6d4ca80 link true /test pull-kcp-test-e2e-multiple-runs

Full PR test history

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/test-infra repository. I understand the commands that are listed here.

@kcp-ci-bot kcp-ci-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 23, 2025
@kcp-ci-bot
Copy link
Contributor

PR needs rebase.

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/test-infra repository.

// dependencies version we're currently using.
var defaultVersionedGenericControlPlaneFeatureGates = map[featuregate.Feature]featuregate.VersionedSpecs{
WorkspaceMounts: {
{Version: version.MustParse("1.28"), Default: false, PreRelease: featuregate.Alpha},
Copy link
Member

Choose a reason for hiding this comment

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

what does this mean? Why do we have our own features here and why with 1.28?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@sttts

Why do we have our own features here

To make them available with the rest of the features that are otherwise k8s-specific. I'm assuming this is how it was before too :D

why with 1.28

"k8s.io/apiserver/pkg/util/feature".DefaultMutableFeatureGate that we merge defaultVersionedGenericControlPlaneFeatureGates into (inside the init function) is versioned, and so we need some version.

kcp has its own versioning, k8s has its own, and this creates a bit of a problem that I indeed wasn't sure how to solve cleanly.

At the moment there seems to be only one way to determine if a specific feature is enabled or disabled by default, and that's through comparing that feature's VersionedSpec with the "emulation" version (see our featureSpecAtEmulationVersion function, and the same one in upstream). "k8s.io/apiserver/pkg/util/feature".DefaultMutableFeatureGate sets the emulation version to be DefaultKubeBinaryVersion = "1.32" in the feature gate's constructor.

To keep all features available, regardless whether they are coming from k8s or kcp, I decided to stick with k8s's versioning, and picked 1.28 specifically because that was the k8s version kcp was depending on when WorkspaceMounts was introduced. I can improve the comment to make this a bit clearer.

One thing to note is that using k8s versioning for kcp features means we cannot release a new feature without bumping k8s (minor!) version too :/ this doesn't sound correct and is something we should definitely discuss.

@sttts
Copy link
Member

sttts commented Feb 23, 2025

Lgtm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dco-signoff: yes Indicates the PR's author has signed the DCO. kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feature: rebase to Kubernetes 1.32.0
4 participants