-
Notifications
You must be signed in to change notification settings - Fork 4k
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
fix: ignore agentpool label when looking for similar node groups with Azure provider #2171
fix: ignore agentpool label when looking for similar node groups with Azure provider #2171
Conversation
Welcome @nilo19! |
/sig azure |
Can you please help to review my code? Thanks. /assign @piosz |
@feiskyer: GitHub didn't allow me to request PR reviews from the following users: CecileRobertMichon. Note that only kubernetes members and repo collaborators can review this PR, and authors cannot review their own PRs. 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. |
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
Thanks for the work
@losipiuk Could you help to take a look at the PR? |
I do not believe this is the way to tackle this. Seems too tactical approach to me and if we go this way for any cloud-provider specific customization then I would very much prefer to have a method: I do not believe such customization should be put in What I propose is somewhat bigger refactor, but hopefully it will pay out later as more CP specific customizations are needed:
WDYT? |
I agree - the point of having processors is to allow customization without further bloating cloudprovider. What @losipiuk proposes makes sense, but I'm not sure if we really need it. |
Thanks, @losipiuk @MaciekPytel. Both proposals are reasonable. But agreed with @MaciekPytel that @losipiuk What do you think about initializing the processors based on provider? |
Kindly ping @losipiuk @MaciekPytel. What do you think? |
The problem is not only the name, but also (mostly) customization logic which is cloud provider specific. What you propose does not address that in any way - the logic would need to be in core codebase, and would be compiled in no matter which CP is used. For simple customizations - which just parametrize processors that are already in core it would work. But for more in-depth customizations, it would be much better to have processor implementation isolated in cloudprovider module. I do not like the approach as it bloats main.go with cp specific logic. We can probably use the approach you propose as a stopgap, though. It would be great though to have a commitment to straighten it up as direct followup. PS. To be fair I am not super sure that with current processor interface the |
I agree with you in principle. My idea only works if you want to use a set of predetermined processors (or a trivial customization like in this case). That being said so far no one needed anything more advanced - every single time a processor was customized in main.go it was to customize comparison for zone balancing. |
Fine. Let's just remember that the issue is there. So we do not extend temporary solution for customizations which no longer fit it.
Yeah - that is very much probable. Let's go with simple approach for now then. |
Does this refactor live up to your expectation? @MaciekPytel |
I do not believe so. Whole point of this discussion was not to access the |
What do you think of it know? @losipiuk @MaciekPytel |
Looks. good. Thanks! |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: losipiuk 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 |
@losipiuk Thanks |
backport #2171: ignore azure agentpool label when comparing nodegroups for similarity
Related to issue #2044 and pull request #2094
Refact the corresponding code in #2094.
The instance of cloudprovider.interface can only be obtained after the cluster autoscaler is built. Therefore, we let each cloud provider implement their own node comparator function, which will later be built in autoscaler in main.go.