-
Notifications
You must be signed in to change notification settings - Fork 13
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
CNF-11193: controller:hypershift: add support in for Kubelet controller #1015
base: main
Are you sure you want to change the base?
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Tal-or 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:
Approvers can indicate their approval by writing |
/hold |
unit test probably failed as well, I'm facing some issues running them locally |
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.
overall looks OK. Need to deep dive into the tests mostly
Take your time. |
205b414
to
330b608
Compare
Latest version allow detecting HyperShift platform. Signed-off-by: Talor Itzhak <[email protected]>
Add the platform field to the reconciler so it would be able to detect whether it run on OCP or HCP. Signed-off-by: Talor Itzhak <[email protected]>
330b608
to
4a2c5f6
Compare
Add the functionality to watch for ConfigMap changes when running on HCP. On HCP the controller should not watch for the bare KubeletConfig object, but for the ConfigMap that hold it. Signed-off-by: Talor Itzhak <[email protected]>
The business logic of kubelet controller is similar when running on OCP or HCP. However there are slighty different parameters that some of the existing functions in the reconcile loop accepts. We introduce the `kubeletConfigHandler` so we could maintain a common API for the functions for both OCP and HCP platforms. Signed-off-by: Talor Itzhak <[email protected]>
The `makeKCHandlerForPlatform` provides a common handler that can be used on both HCP and OCP platform. This way allow us to narrow down the changes in the logic in to a centeral close-scoped function in the code, without having the need to branch the logic for HCP and OCP in other areas in the Reconcile loop. Signed-off-by: Talor Itzhak <[email protected]>
Change the signature to accept kubeletConfigHandler object. Signed-off-by: Talor Itzhak <[email protected]>
4a2c5f6
to
2a777ed
Compare
Put the kubeletconfig controller tests inside a DescribeTable where one entry is for OCP and another for HCP. Signed-off-by: Talor Itzhak <[email protected]>
2a777ed
to
c9d4690
Compare
@Tal-or: This pull request references CNF-11193 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.18.0" version, but no target version was set. In response to this:
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 openshift-eng/jira-lifecycle-plugin repository. |
/retest |
1 similar comment
/retest |
/test ci-e2e |
@Tal-or: 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. |
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. |
Kubelet controller is responsible for extracting the TM configuration from the
KubeletConfig
object, craft aConfigMap
from it so it could be consumed later onby the RTE workload.
On HyperShift there's no plain
KubeletConfig
object but aConfigMap
that encapsulate it instead,This PR contains all the changes that were needed for the controller to be able to provide
similar functionality when it's running on HyperShift platform.