crossplane-contrib / provider-upjet-azure

Official Azure Provider for Crossplane by Upbound.
Apache License 2.0
61 stars 75 forks source link

`KubernetesCluster` with BYO DNS does not clean up A record after destruction #615

Closed naimadswdn closed 1 month ago

naimadswdn commented 9 months ago

What happened?

Private Kubernetes Cluster creation with Bring Your Own DNS does not clean up A record after destruction. Similar issue was affecting Terraform azurerm_kubernetes_cluster resource but it has been fixed with proper dependency setup.

How can we reproduce it?

Resources to create (it can be done separately or as a part of one Composition)

After the creation, you can see that A record has been added to the Private DNS zone with the private IP.

Now, remove the Kubernetes Cluster and all the resources besides Private DNS zone. The A record will stay and will prevent creation of the AKS with the same name with the same Private DNS zone.

Its a big blocker especially with environments with centralized DNS (where Private DNS zone is created upfront and is not part of the AKS composition).

What environment did it happen in?

jakubramut commented 9 months ago

Just faced the same issue, do we have any workarounds to be implemented here?

turkenf commented 8 months ago

Hi @naimadswdn, @jakubramut,

Thank you for bringing up this, could you please share with us clear reproduction steps with used MRs?

fherbert commented 8 months ago

It's caused by the ordering when deleting resources, you'll need to delete the user assigned identity last, after the roleassignment for private dns zone contributer using the beta Usages feature in crossplane 1.14

github-actions[bot] commented 5 months ago

This provider repo does not have enough maintainers to address every issue. Since there has been no activity in the last 90 days it is now marked as stale. It will be closed in 14 days if no further activity occurs. Leaving a comment starting with /fresh will mark this issue as not stale.

github-actions[bot] commented 2 months ago

This provider repo does not have enough maintainers to address every issue. Since there has been no activity in the last 90 days it is now marked as stale. It will be closed in 14 days if no further activity occurs. Leaving a comment starting with /fresh will mark this issue as not stale.

github-actions[bot] commented 1 month ago

This issue is being closed since there has been no activity for 14 days since marking it as stale. If you still need help, feel free to comment or reopen the issue!