-
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
Add support for kubeletDiskType #2938
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -361,6 +361,30 @@ spec: | |
osDiskType: "Ephemeral" | ||
``` | ||
|
||
## AKS Node Pool KubeletDiskType configuration | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This made me realize I haven't been adding docs for new features at all, so thanks for adding this! I opened an issue to make sure we get caught up there: #2948 |
||
|
||
You can configure the `KubeletDiskType` value for each AKS node pool (`AzureManagedMachinePool`) that you define in your spec (see [here](https://learn.microsoft.com/en-us/rest/api/aks/agent-pools/create-or-update?tabs=HTTP#kubeletdisktype) for the official AKS documentation). There are two options to choose from: `"OS"` or `"Temporary"`. | ||
|
||
Before this feature can be used, you must register the `KubeletDisk` feature on your Azure subscription with the following az cli command. | ||
|
||
```bash | ||
az feature register --namespace Microsoft.ContainerService --name KubeletDisk | ||
``` | ||
|
||
Below an example `kubeletDiskType` configuration is assigned to `agentpool0`, specifying that the emptyDir volumes, container runtime data root, and Kubelet ephemeral storage will be stored on the temporary disk: | ||
|
||
```yaml | ||
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 | ||
kind: AzureManagedMachinePool | ||
metadata: | ||
name: agentpool0 | ||
spec: | ||
mode: System | ||
osDiskSizeGB: 30 | ||
sku: Standard_D2s_v3 | ||
kubeletDiskType: "Temporary" | ||
``` | ||
|
||
### AKS Node Pool Taints | ||
|
||
You can configure the `Taints` value for each AKS node pool (`AzureManagedMachinePool`) that you define in your spec. | ||
|
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.
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 see this wasn't added to the normalizedProfile used to calculate updates here: https://github.com/kubernetes-sigs/cluster-api-provider-azure/pull/2938/files#diff-2c4585415b3fabfd1913f95eb20bc57daac00c2facd3ffa45d3bb00bb1d41b63R189
My understanding is that it's intentional because the property is immutable but I just want to confirm?
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 think the link might be pointing to the wrong place, but I don't think this was intentional. I'm not exactly familiar with the normalizedProfile. Would this field be left out since it's immutable?
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.
maybe @nojnhuh or @jackfrancis can help answer 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.
GitHub is having trouble rendering that link for me too, but I'm guessing it's here?
cluster-api-provider-azure/azure/services/agentpools/spec.go
Line 189 in 5b05d6e
@CecileRobertMichon That's not the same field being added in this change, and I see that's conditionally added to
normalizedProfile
below, so that seems fine at first glance to me, albeit slightly asymmetrical with everything else:cluster-api-provider-azure/azure/services/agentpools/spec.go
Line 208 in 5b05d6e
To your question @willie-yao, yes, if this field is immutable, then we don't need to include it in
existingProfile
ornormalizedProfile
. A diff between those two objects is what ultimately triggers a PUT request to make an update, but the webhook enforces that this field can't change.