-
Notifications
You must be signed in to change notification settings - Fork 328
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
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for hypershift-docs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: haircommander 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 |
/hold |
3cff2d0
to
15edc8e
Compare
15edc8e
to
8ee6f25
Compare
} | ||
|
||
// 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) { |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
8ee6f25
to
b506416
Compare
@@ -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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
8e963e6
to
6a474be
Compare
6a474be
to
e46c0d3
Compare
221d2ab
to
39be3dd
Compare
* 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>
39be3dd
to
f346983
Compare
/retest |
f346983
to
da6b335
Compare
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>
da6b335
to
c6064b9
Compare
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. |
@haircommander: The following tests failed, say
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. |
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