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
🐛 normalize version in managed control plane #818
🐛 normalize version in managed control plane #818
Changes from all commits
9f28c6f
38303cf
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.
can this go in a webhook?
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 suggesting a default version?
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 that way the normalized version appears in the spec and it's not too hidden from the user, same as https://github.com/CecileRobertMichon/cluster-api/blob/master/api/v1alpha3/machine_webhook.go#L60
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.
Webhooks are not currently setup for
AzureManged*
. Can we open an issue to track this and pull in these changes?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.
#615
#612
I can add a defaulting webhook to
AzureManagedMachinePool
in this PR.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.
Great point.
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.
That was part of the changes in kubernetes-sigs/cluster-api#3147, the Version isn't part of MachinePool spec, it's part of Machine spec which is embedded in the MachinePool spec as part of the template https://github.com/kubernetes-sigs/cluster-api/blob/master/exp/api/v1alpha3/machinepool_types.go#L44
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.
So actually do we even need this normalization here? Since the Machine webhook already takes care of it
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.
For
AzureManagedControlPlane
Version is part of the object https://github.com/kubernetes-sigs/cluster-api-provider-azure/pull/818/files#diff-69a80dafa12ba6b9eeaf233d609e8f5eR29 so we could do the same normalization in a webhook, forAzureMachinePool
I believe it's already taken care of by theMachine
webhooksThere 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.
Ok so after some coffee and thinking through it with @devigned I think we need to:
Let's track whatever we don't get done here in issues so they don't get lost.
I take back what I said above, the Machine webhook doesn't do anything for MachinePool, only the schema validation is shared.