-
Notifications
You must be signed in to change notification settings - Fork 431
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
[AKS] The default MachinePool should be of "system" type, not "user" #1376
Comments
The correct fix here is:
think I forgot something as I was writing out the validation details, but that's the gist of it. |
MachinePool has spec.clusterName, we could do something similar with AzureManagedMachinePool (e.g. spec.machinePool) to link bidirectionally...a bit annoying but would make the webhook validation way easier (// possible at all) |
Hi Alex, Why do we have a defaultPoolRef in capz ? Advantages:
|
The only reason for the default pool ref is to enforce the invariant that AKS clusters always have at least one (now, system) node pool. Totally happy to see other solutions to that, but the thinking was we shouldn’t allow the CRD representation of an AKS cluster to enter invalid states, e.g. we should reject attempts to update AzureManagedControlPlane or AzureManagedMachinePools which result in zero system pools existing. |
Honestly speaking, when i started to think and try to reason out why the existing API has defaultPoolRef even i felt the same. We should maintain a minimum of one system node pool. I agree and it makes sense 👍 . But another thought I have for the above problem is, can we add a custom admission webhook, where in if it is the last system node pool and if the user tries to delete it we can reject the request. By doing so we can also avoid the possibility of having zero system node pools. During the creation phase we can make the check at the azuremanagedcontrolplane reconciler. Just like how it happens in the exiting system. |
If we can do a webhook which lists all the pools and checks for at least one that works. If we do that, would you create the cluster with all pools? Or just pick a random system pool for creation and then reconcile the rest in parallel? |
During the creation time if we have multiple system node pools, I think I will create the cluster with all the system node pools provided. |
sgtm. I think we may want to avoid updating the node pools after creation inside the managed cluster service? And let agentpools service/reconciler handle updates after the cluster is ready. We’ll save some calls to Azure that way and avoid some conflicting operations, I think |
Ok yeah make sense 👍 |
If the webhook cannot list and figure out if it is a the last system node pool, may be shift the logic in azuremanagedmachinepool_reconciler and make the check there while deletion and prevent it from happening. |
/kind bug
What steps did you take and what happened:
I create an AKS cluster with 2 machine pools.
What did you expect to happen:
The default machine pool should be a "system" node pool.
Anything else you would like to add:
The node pool type should be a property of
AzureManagedMachinePool
, in order to allow its configuration.Environment:
v0.4.14
kubectl version
):v1.20.5
/etc/os-release
):Ubuntu 18.04.2 LTS
The text was updated successfully, but these errors were encountered: