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

add support for minimumKubeletVersion #4980

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

Conversation

haircommander
Copy link
Member

What this PR does / why we need it:
Add support for minimum kubelet version
carries openshift/api#2059 and #4927

Which issue(s) this PR fixes (optional, use fixes #<issue_number>(, fixes #<issue_number>, ...) format, where issue_number might be a GitHub issue, or a Jira story:
Fixes #

Checklist

  • Subject and description added to both, commit and PR.
  • Relevant issues have been referenced.
  • This change includes docs.
  • This change includes unit tests.

@openshift-ci openshift-ci bot added do-not-merge/needs-area do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. labels Oct 24, 2024
Copy link

netlify bot commented Oct 24, 2024

Deploy Preview for hypershift-docs ready!

Name Link
🔨 Latest commit f346983
🔍 Latest deploy log https://app.netlify.com/sites/hypershift-docs/deploys/674098de933bb60008913bdf
😎 Deploy Preview https://deploy-preview-4980--hypershift-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@openshift-ci openshift-ci bot added area/ci-tooling Indicates the PR includes changes for CI or tooling area/cli Indicates the PR includes changes for CLI area/control-plane-operator Indicates the PR includes changes for the control plane operator - in an OCP release labels Oct 24, 2024
Copy link
Contributor

openshift-ci bot commented Oct 24, 2024

[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 bryan-cox 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

@openshift-ci openshift-ci bot added area/control-plane-pki-operator Indicates the PR includes changes for the control plane PKI operator - in an OCP release area/documentation Indicates the PR includes changes for documentation area/hypershift-operator Indicates the PR includes changes for the hypershift operator and API - outside an OCP release and removed do-not-merge/needs-area labels Oct 24, 2024
@enxebre
Copy link
Member

enxebre commented Oct 25, 2024

/hold
Let's make sure we get openshift/api#2059 in first

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 25, 2024
@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 29, 2024
@openshift-ci openshift-ci bot added area/api Indicates the PR includes changes for the API area/testing Indicates the PR includes changes for e2e testing labels Oct 29, 2024
@openshift-merge-robot openshift-merge-robot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Oct 29, 2024
}

// A helper function to factor out the pieces that rely on a functioning guest cluster, added for unit testing purposes.
func (r *HostedControlPlaneReconciler) getHostedClusterNodesClient(ctx context.Context, hc *hyperv1.HostedControlPlane) (corev1client.NodesGetter, error) {
Copy link
Member

@enxebre enxebre Nov 4, 2024

Choose a reason for hiding this comment

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

hypershift cohesively groups adhoc controllers that need to reconcile guest cluster resources within the hostedclusterconfigoperator.
See https://github.com/openshift/hypershift/tree/main/control-plane-operator/hostedclusterconfigoperator/controllers/nodecount

Please add the logic to set the current minimum version in the HCP.status there (similar to what we are doing for node count). Ideally this logic would run its own controller that is instantiated here https://github.com/openshift/hypershift/blob/main/control-plane-operator/hostedclusterconfigoperator/controllers/nodecount/setup.go#L22 so then we can run it only when the MinimumKubeletVersion gate is enabled

Copy link
Member Author

Choose a reason for hiding this comment

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

are you opposed to me running it in https://github.com/openshift/hypershift/blob/main/control-plane-operator/hostedclusterconfigoperator/controllers/node/node.go instead and gating that behavior on the feature gate, to reduce bolierplate?

Copy link
Member Author

Choose a reason for hiding this comment

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

alrighty we chatted offline and the new controller was suggested, so I've adopted that and used that to pass the oldestKubeletVersion to the HCP controller

@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 5, 2024
@@ -303,6 +303,9 @@ type HostedControlPlaneStatus struct {

// NodeCount tracks the number of nodes in the HostedControlPlane.
NodeCount *int `json:"nodeCount,omitempty"`

// OldestKubeletVersion tracks the oldest kubelet version in a hosted cluster
Copy link
Member

@enxebre enxebre Nov 5, 2024

Choose a reason for hiding this comment

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

This must be behind the featuregate marker and we will want the same feature gated field within the the HostedCluster. So we can bubble it up. HCP is an imple detail. HC is consumer facing.

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'm curious what you're imagining the data flow to be. kubelet versions -> HostedCluster -> HostedControlPlane, or kubelet versions -> HostedControlPlane -> Hosted Cluster or kubelet versions -> HostedCluster ; kubelet versions - > HostedControlPlane

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 I'm confused why we need to involve the HostedCluster object at all here. HCP has the client connection and has the oldestKubeletVersion field, so it can validate the minimumKubeletversion and set a condition on the HCP object. It seems to me that when HCP condition is set, that will bubble up to the HC object which will then get exposed. Why do we need an additional field + additional controller for that field and potentially duplicate the checks

@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 13, 2024
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 21, 2024
@haircommander haircommander force-pushed the min-kubelet-version branch 3 times, most recently from 221d2ab to 39be3dd Compare November 22, 2024 14:36
@haircommander haircommander changed the title WIP: add support for minimumKubeletVersion add support for minimumKubeletVersion Nov 22, 2024
@openshift-ci openshift-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 Nov 22, 2024
@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 22, 2024
EmilienM and others added 4 commits November 22, 2024 09:43
* Ignition to 2.18.0
* openshift/api and client-go to the most recent commit on November 18th 2024.
* k8s to v0.31.1
* CAPI to v1.8.4
* controller-runtime to v0.19.0

And then run `go mod tidy && go mod vendor`, `make update` and
`UPDATE=true go test ./...`.
Signed-off-by: Peter Hunt <pehunt@redhat.com>
Signed-off-by: Peter Hunt <pehunt@redhat.com>
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 22, 2024
@haircommander
Copy link
Member Author

/retest

Signed-off-by: Peter Hunt <pehunt@redhat.com>
Signed-off-by: Peter Hunt <pehunt@redhat.com>
Signed-off-by: Peter Hunt <pehunt@redhat.com>
Signed-off-by: Peter Hunt <pehunt@redhat.com>
Signed-off-by: Peter Hunt <pehunt@redhat.com>
…Version

Signed-off-by: Peter Hunt <pehunt@redhat.com>
Signed-off-by: Peter Hunt <pehunt@redhat.com>
@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 12, 2024
@openshift-merge-robot
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-sigs/prow repository.

Copy link
Contributor

openshift-ci bot commented Dec 16, 2024

@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/e2e-aws-4-17 da6b335 link true /test e2e-aws-4-17
ci/prow/e2e-aws-4-18 c6064b9 link true /test e2e-aws-4-18
ci/prow/e2e-kubevirt-aws-ovn-reduced c6064b9 link true /test e2e-kubevirt-aws-ovn-reduced
ci/prow/verify c6064b9 link true /test verify
ci/prow/e2e-aws c6064b9 link true /test e2e-aws
ci/prow/unit c6064b9 link true /test unit
ci/prow/e2e-aws-override c6064b9 link true /test e2e-aws-override
ci/prow/e2e-aks c6064b9 link true /test e2e-aks
ci/prow/e2e-aws-upgrade-hypershift-operator c6064b9 link true /test e2e-aws-upgrade-hypershift-operator

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
area/api Indicates the PR includes changes for the API area/ci-tooling Indicates the PR includes changes for CI or tooling area/cli Indicates the PR includes changes for CLI area/control-plane-operator Indicates the PR includes changes for the control plane operator - in an OCP release area/control-plane-pki-operator Indicates the PR includes changes for the control plane PKI operator - in an OCP release area/documentation Indicates the PR includes changes for documentation area/hypershift-operator Indicates the PR includes changes for the hypershift operator and API - outside an OCP release area/testing Indicates the PR includes changes for e2e testing do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants