Closed fschmied closed 1 year ago
Hi fschmied, AKS bot here :wave: Thank you for posting on the AKS Repo, I'll do my best to get a kind human from the AKS team to assist you.
I might be just a bot, but I'm told my suggestions are normally quite good, as such: 1) If this case is urgent, please open a Support Request so that our 24/7 support team may help you faster. 2) Please abide by the AKS repo Guidelines and Code of Conduct. 3) If you're having an issue, could it be described on the AKS Troubleshooting guides or AKS Diagnostics? 4) Make sure your subscribed to the AKS Release Notes to keep up to date with all that's new on AKS. 5) Make sure there isn't a duplicate of this issue already reported. If there is, feel free to close this one and '+1' the existing issue. 6) If you have a question, do take a look at our AKS FAQ. We place the most common ones there!
Triage required from @Azure/aks-pm
Action required from @Azure/aks-pm
Issue needing attention of @Azure/aks-leads
Issue needing attention of @Azure/aks-leads
Issue needing attention of @Azure/aks-leads
Issue needing attention of @Azure/aks-leads
Issue needing attention of @Azure/aks-leads
Issue needing attention of @Azure/aks-leads
Issue needing attention of @Azure/aks-leads
Issue needing attention of @Azure/aks-leads
Issue needing attention of @Azure/aks-leads
Issue needing attention of @Azure/aks-leads
Issue needing attention of @Azure/aks-leads
Issue needing attention of @Azure/aks-leads
Issue needing attention of @Azure/aks-leads
Issue needing attention of @Azure/aks-leads
Issue needing attention of @Azure/aks-leads
Issue needing attention of @Azure/aks-leads
Issue needing attention of @Azure/aks-leads
Issue needing attention of @Azure/aks-leads
Issue needing attention of @Azure/aks-leads
Issue needing attention of @Azure/aks-leads
Issue needing attention of @Azure/aks-leads
Issue needing attention of @Azure/aks-leads
Issue needing attention of @Azure/aks-leads
Issue needing attention of @Azure/aks-leads
Issue needing attention of @Azure/aks-leads
Issue needing attention of @Azure/aks-leads
This is a limitation of the current AKS API implementation, where PUT has merge semantics. This means you can't just remove something from the API (as then the merge semantics kick in). The workaround is to explicitly set the addon enabled: false
, rather than just removing it. That should correctly disable the addon.
We're talking about ways to update this behavior in the future to be more intuitive (and work better with policy), but those conversations are ongoing.
Okay, thanks for the information!
What happened: We have an existing AKS cluster. We added and enabled the Azure Policy add-on via the Defender for Containers provisioning Azure Policy Addon for Kubernetes Azure Policy Assignment. We later removed that Policy Assignment, but the Azure Policy add-on of course remained present and enabled.
We then redeployed the AKS cluster using the original Bicep file, which did not list the
azurepolicy
add-on underaddonProfiles
:Yet, the Azure Policy add-on still remained present and enabled on the cluster.
What you expected to happen: I expected the AKS cluster to be adapted to match the Bicep resource definition. I.e., I expected the
azurepolicy
addonProfile to be removed because it was not listed in the Bicep file.How to reproduce it (as minimally and precisely as possible):
azurepolicy
add-on.azurepolicy
underaddonProfiles
.azurepolicy
add-on entry fromaddonProfiles
in the ARM file.azurepolicy
add-on remains present and enabled, it was not removed in the previous step.Environment:
kubectl version
): 1.22.6