Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Implement ScaleSetPriority for AzureManagedMachinePool #2604
Implement ScaleSetPriority for AzureManagedMachinePool #2604
Changes from all commits
d498079
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
does this intentionally drop any labels that are not system labels (ie. no kubernetes.azure.com prefix) but aren't part of the CAPZ spec? for example if they were added by some external process
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.
Yes. I think the idea here is that capz is the "exclusive" maintainer of labels, and the update interface has been defined such that every time you push a labels change you need to include the entire set of labels. Ref:
https://learn.microsoft.com/en-us/azure/aks/use-labels#updating-labels-on-existing-node-pools
The think about the
kubernetes.azure.com
-prefixed labels is (IMO) and AKS bug, and hopefully we can drop this foo at some point in the future.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.
Azure/AKS#3152
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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.
@jackfrancis if you send the
Regular
value. AKS isn't setting it toRegular
but returns the empty.Later any other change to nodepool will fail as Azure API returns the error that it cannot change from
""
toRegular
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 wasn't able to reproduce this with labels changes to the node pool. Which node pool changes were you seeing this on when
ScaleSetPriority
was set to"Regular"
?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.
Again I did some more manual tests and this looks fine. Creating a cluster with an explicit
scaleSetPriority: Regular
AzureManagedMachinePool
configuration does not have any apparent negative side-effects.I think this PR is ready to gol
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.
still doesn't work for me.
steps to reproduce:
ScaleSetPriority
set toRegular
az aks nodepool show --cluster-name cluster-name -n nodepool-name
that it has"scaleSetPriority": null,
Message=\"Changing property 'properties.ScaleSetPriority' is not allowed.
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.
Are you testing using a build from this branch? In this current PR implementation, I definitely can't reproduce. I do observe what you're seeing from the AKS API:
However, I'm able to continually update the node pool using capz (using node labels below as an example):
You can see I've already applied a
foo: bar
node label. I'll now add a 2nd label:Now if I get the node pool data from the AKS API I see the updated label:
As expected,
ScaleSetPriority
is unchanged from either source:I think this PR has overcome this particular pathology. We should ship add'l E2E tests with this PR to prove it, but I'm confident we're good here.
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.
definitely its working now, does Azure API changed something?
in any case I agree to merge this
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 don't think it's possible to do this validation in the kubebuilder API type spec (e.g., using the
Pattern=
interface to define a required regular expression match) because the API type is amap[string]string
.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.
FWIW I don't think doing this is necessary here because we're never taking the address of
tc
in the subtest (like with&tc
). Certainly doesn't hurt to keep it here though in case this test needs to do that in the future.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.
Two points:
🤷
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.