-
Notifications
You must be signed in to change notification settings - Fork 66
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
WINC-649: [wmco] Change BYOH annotation to a label #549
Conversation
/approve cancel |
/lgtm |
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.
Thanks for working on this --
/lgtm
LGTM |
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.
Thanks for doing this, @sebsoto. Please address my comment.
controllers/configmap_controller.go
Outdated
@@ -219,7 +219,7 @@ func (r *ConfigMapReconciler) ensureInstancesAreUpToDate(instances []*instances. | |||
func (r *ConfigMapReconciler) deconfigureInstances(instances []*instances.InstanceInfo, nodes *core.NodeList) error { | |||
for _, node := range nodes.Items { | |||
// Only looking at BYOH nodes | |||
if _, present := node.Annotations[BYOHAnnotation]; !present { | |||
if _, present := node.GetLabels()[BYOHLabel]; !present { |
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 suggest updating the filter when you are getting the list of nodes.
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.
Done.
controllers/configmap_controller.go
Outdated
nodes := &core.NodeList{} | ||
if err := r.client.List(ctx, nodes); err != nil { | ||
if err := r.client.List(ctx, nodes, client.MatchingLabels{BYOHLabel: "true"}); err != nil { |
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.
To be on the safe side, the Windows label should also be added.
// Only looking at BYOH nodes | ||
if _, present := node.Annotations[BYOHAnnotation]; !present { | ||
continue | ||
} |
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 implies the method doc needs to be updated to state that that input nodes are assumed to be Windows BYOH
Thanks for working on this @sebsoto |
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.
/lgtm
Changes the BYOH annotation to a label to allow for easier selection of BYOH nodes.
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.
Thanks for doing this, @sebsoto
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: aravindhp, jrvaldes, saifshaikh48 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 |
/lgtm |
Machine provisioning flake, not an issue on our side |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/cherry-pick community-4.8 |
@sebsoto: new pull request created: #563 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 kubernetes/test-infra repository. |
/cherry-pick release-4.8 |
@mansikulkarni96: new pull request created: #606 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 kubernetes/test-infra repository. |
Changes the BYOH annotation to a label to allow for easier selection of
BYOH nodes.