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

UPSTREAM: <carry>: add minimumkubeletversion admission package #2201

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

haircommander
Copy link
Member

What type of PR is this?

What this PR does / why we need it:

#2104 + admission pieces, as requested by #2104 (comment)

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?


Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


@openshift-ci-robot openshift-ci-robot added the backports/unvalidated-commits Indicates that not all commits come to merged upstream PRs. label Feb 7, 2025
@openshift-ci-robot
Copy link

@haircommander: the contents of this pull request could not be automatically validated.

The following commits could not be validated and must be approved by a top-level approver:

Comment /validate-backports to re-evaluate validity of the upstream PRs, for example when they are merged upstream.

@openshift-ci openshift-ci bot requested review from deads2k and p0lyn0mial February 7, 2025 17:02
@openshift-ci openshift-ci bot added the vendor-update Touching vendor dir or related files label Feb 7, 2025
Copy link

openshift-ci bot commented Feb 7, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: haircommander
Once this PR has been reviewed and has the lgtm label, please assign jerpeter1 for approval. For more information see the 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

admission.ValidationInterface

nodeLister func() corev1listers.NodeLister
waitForReady func() func() bool

Choose a reason for hiding this comment

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

I would prefer this to be waitForNodeInformerSyncedFn func() bool

Copy link
Member Author

Choose a reason for hiding this comment

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

I think it needs to be func() func() bool because at the time of constrution the validator may not have c.handler initialized, as it's only initialized when SetExternalKubeInformerFactory is called which i think is after the object initialization here

Choose a reason for hiding this comment

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

Mhm, I think the content of the function changes, but the "pointer" to the function remains the same, so we should be fine, no ? .

In general, the plugins are initialized, validated, and only then wired to handlers.

Maybe we could write a small program that would demonstrate the issue ?

Copy link
Member Author

Choose a reason for hiding this comment

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

okay you seem to be right, I was worried it wasn't saved as a pointer https://go.dev/play/p/h_vI248v25o

Copy link
Member Author

Choose a reason for hiding this comment

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

hmm though https://go.dev/play/p/2P8e4jurISL gives pause. I'm leaving it your way for now

Choose a reason for hiding this comment

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

hmm, I think that our scenario is more like https://go.dev/play/p/fHVBh-U_Gtk, no ?

@haircommander haircommander changed the title UPSTREAM: <carry>: add minimumkubeletversion package UPSTREAM: <carry>: add minimumkubeletversion admission package Feb 13, 2025
@openshift-ci-robot
Copy link

@haircommander: the contents of this pull request could not be automatically validated.

The following commits could not be validated and must be approved by a top-level approver:

Comment /validate-backports to re-evaluate validity of the upstream PRs, for example when they are merged upstream.

@haircommander
Copy link
Member Author

I took your suggestions except for the func () func () bool piece as I'm anxious about breaking that piece


nodes, err := c.nodeListerFn().List(labels.Everything())
if err != nil {
return field.Forbidden(fieldPath, fmt.Sprintf("Getting nodes to compare minimum version %v", err.Error()))

Choose a reason for hiding this comment

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

I don't think the type of the error matters much because these errors are reported as apierrors.NewInvalid, but maybe we could change this one to field.NotFound(...)

@@ -0,0 +1,218 @@
package node

Choose a reason for hiding this comment

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

Please update the PR so that I can see the diff applied to this file and the others. That will make it easier to review further.

Copy link
Member Author

Choose a reason for hiding this comment

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

I believe you can in 92080d3 and 99174f9 as 95bf4b8 is just a simple copy

Choose a reason for hiding this comment

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

OK, so the only outstanding comment is #2201 (comment).

Other than that this LGTM.

@openshift-ci-robot
Copy link

@haircommander: the contents of this pull request could not be automatically validated.

The following commits could not be validated and must be approved by a top-level approver:

Comment /validate-backports to re-evaluate validity of the upstream PRs, for example when they are merged upstream.

@openshift-ci-robot
Copy link

@haircommander: the contents of this pull request could not be automatically validated.

The following commits could not be validated and must be approved by a top-level approver:

Comment /validate-backports to re-evaluate validity of the upstream PRs, for example when they are merged upstream.

@haircommander
Copy link
Member Author

/retest

Copy link

openshift-ci bot commented Feb 17, 2025

@haircommander: 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
ci/prow/okd-scos-e2e-aws-ovn 99f96bb link false /test okd-scos-e2e-aws-ovn
ci/prow/k8s-e2e-conformance-aws 99f96bb link true /test k8s-e2e-conformance-aws
ci/prow/k8s-e2e-aws-ovn-serial 99f96bb link false /test k8s-e2e-aws-ovn-serial
ci/prow/e2e-aws-ovn-serial 99f96bb link true /test e2e-aws-ovn-serial
ci/prow/e2e-gcp-ovn-upgrade 99f96bb link true /test e2e-gcp-ovn-upgrade
ci/prow/e2e-aws-ovn-runc 99f96bb link true /test e2e-aws-ovn-runc
ci/prow/e2e-aws-ovn-fips 99f96bb link true /test e2e-aws-ovn-fips
ci/prow/e2e-aws-crun-wasm 99f96bb link true /test e2e-aws-crun-wasm
ci/prow/e2e-agnostic-ovn-cmd 99f96bb link false /test e2e-agnostic-ovn-cmd
ci/prow/e2e-aws-ovn-cgroupsv2 99f96bb link true /test e2e-aws-ovn-cgroupsv2
ci/prow/e2e-aws-ovn-crun 99f96bb link true /test e2e-aws-ovn-crun
ci/prow/e2e-aws-csi 99f96bb link false /test e2e-aws-csi
ci/prow/e2e-gcp 99f96bb link true /test e2e-gcp
ci/prow/k8s-e2e-gcp-ovn 99f96bb link true /test k8s-e2e-gcp-ovn
ci/prow/k8s-e2e-gcp-serial 99f96bb link true /test k8s-e2e-gcp-serial
ci/prow/e2e-aws-ovn-hypershift 99f96bb link true /test e2e-aws-ovn-hypershift

Full PR test history. Your PR dashboard.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backports/unvalidated-commits Indicates that not all commits come to merged upstream PRs. vendor-update Touching vendor dir or related files
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants