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

Allow AWS and ClusterAPI providers to ignore topology.ebs.csi.aws.com/zone label #4458

Merged
merged 2 commits into from
Nov 15, 2021

Conversation

elmiko
Copy link
Contributor

@elmiko elmiko commented Nov 10, 2021

This change adds 2 commits that will allow the AWS and ClusterAPI providers to ignore the topology.ebs.csi.aws.com/zone label. This label is used by the AWS EBS CSI driver, and will cause the --balance-similar-node-groups flag to fail on these platforms when comparing node groups that are in different availability zones. It adds the label to the existing AWS nodegroupset processor and creates a new processor for ClusterAPI. Also adds unit tests to exercise the processors.

fixes: #3230

This change adds the aforementioned label to the list of ignored labels
in the AWS nodegroupset processor. This change is being made in response
to the addition of this label by the aws-ebs-csi-driver. This label will
eventually be deprecated by the driver, but its use will prevent AWS
users from properly balancing similar nodes. Also adds unit test for the
AWS processor.

ref: kubernetes#3230
ref: kubernetes-sigs/aws-ebs-csi-driver#729
This allows the ClusterAPI provider to ignore the
`topology.ebs.csi.aws.com/zone` label by adding a custom nodegroupset
processor. It also adds unit tests to exercise the new processor.
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Nov 10, 2021
@elmiko
Copy link
Contributor Author

elmiko commented Nov 10, 2021

/assign @MaciekPytel
/assign @gjtempleton

ptal, we talked about this during the last sig meeting (8 nov 2021)

@JoelSpeed
Copy link
Contributor

Code looks clean and in-keeping with existing patterns within the area. I have been talking to @elmiko through the process of diagnosing this bug and I think this should solve the issue

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 11, 2021
@gjtempleton
Copy link
Member

This looks good to me, thanks for adding the AWS processor test and making it so thorough!

Will leave the final say to Maciek.

/lgtm

label string
value1 string
value2 string
removeOneLabel bool
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: I would consider adding negative cases as well. Right now a comparator that strips all labels (or just always return true) would pass the tests.

I don't think it's at all blocking for this PR (it's already very much net positive on test coverage), just something to maybe consider later on.

@MaciekPytel
Copy link
Contributor

/lgtm
/approve

This mainly impacts AWS and Cluster API, but there is a clear approval from both providers above, so merging this.

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: elmiko, MaciekPytel

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 15, 2021
@k8s-ci-robot k8s-ci-robot merged commit 222f71e into kubernetes:master Nov 15, 2021
@elmiko elmiko deleted the aws-ebs-zone-label branch May 24, 2023 08:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ignore topology.ebs.csi.aws.com/zone label for Balance-Similar-NodeGroups
5 participants