feat: add a controller to label Nodes with PD compatibility labels#2257
Conversation
|
Welcome @hdp617! |
|
Hi @hdp617. Thanks for your PR. I'm waiting for a github.com member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions 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. |
fed4ded to
d823964
Compare
|
/ok-to-test |
|
/retest |
| } | ||
|
|
||
| // UpdateMachinePDCompatibility updates the controller's machine PD compatibility map from a ConfigMap. | ||
| func (r *Reconciler) UpdateMachinePDCompatibility(ctx context.Context) error { |
There was a problem hiding this comment.
This does not seem thread-safe, will there be some race of updating the map?
There was a problem hiding this comment.
I'm using a mutex in updateMap() below when updating the map. Any race conditions that you're seeing?
|
Last but not least, how about documentation update in the repo(feel free to do it in another PR as well)? |
|
@sunnylovestiramisu Thanks for looking into this PR. I've replied to a few comments and will address the rest soon. |
d823964 to
360a4bb
Compare
|
/retest-required |
|
@sunnylovestiramisu @mattcary @hajiler Would you mind taking another look? Thanks! |
|
Please provide end to end testing results before the PR review meeting. |
65c4b9c to
3938196
Compare
|
/lgtm |
3938196 to
761f970
Compare
|
Quick summary of the offline discussion with @hajiler below. Feel free to add if I missed something. Would you mind re-LGTM?
I've squashed the commits. @sunnylovestiramisu Could you give the final approval? Thanks! |
|
/retest-required |
|
@hdp617: The following tests failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. DetailsInstructions 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. |
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: hdp617, sunnylovestiramisu The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/lgtm |
What type of PR is this?
/kind feature
What this PR does / why we need it:
This PR introduces a new component
gce-pd-node-labeler. It's a controller implemented withcontroller-runtime, which automatically labels Nodes with PD labels. The source of truth is a ConfigMap that can be configured with--configmap-nameand--configmap-namespaceflags.Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Re. testing, I've verified with a k8s-on-gce cluster with 2 gen2 nodes and 2 gen4 nodes:
Add a configmap (not actually SoT):
Build the container image and add this component as a sidecar in the
csi-gce-pd-controller:And verify that the labels are added.
Does this PR introduce a user-facing change?: