Azure / aks-app-routing-operator

Kubernetes operator that implements AKS Application Routing
https://learn.microsoft.com/en-us/azure/aks/app-routing
MIT License
30 stars 20 forks source link

DNS zone management when deployment is removed #91

Closed jorisscheppers closed 11 months ago

jorisscheppers commented 1 year ago

I have been using the Web Application Routing preview feature for my AKS cluster for a while now. While the lifecycle of the K8s objects are managed by my pipeline in Gitlab, I kind of expected the app-routing-operator to manage the deletion of DNS records that were automatically created when deploying an Ingress resource. This seems not to be the case, so when creating short-lived test environments that are based on Git branch names, the number of DNS records piles up.

It would be a nice addition to the operator if it also performs cleanup created resources.

OliverMKing commented 1 year ago

Thanks for the suggestion @jorisscheppers. Tagging @sabbour for visibility.

OliverMKing commented 1 year ago

I have been using the Web Application Routing preview feature for my AKS cluster for a while now. While the lifecycle of the K8s objects are managed by my pipeline in Gitlab, I kind of expected the app-routing-operator to manage the deletion of DNS records that were automatically created when deploying an Ingress resource. This seems not to be the case, so when creating short-lived test environments that are based on Git branch names, the number of DNS records piles up.

It would be a nice addition to the operator if it also performs cleanup created resources.

@jorisscheppers Can you expand on what "short-lived test environments" means? Are you deleting clusters for these short-lived environments or are using a long-running cluster and only deleting resources inside the cluster?

jorisscheppers commented 1 year ago

Sorry for not being clear about that. I have a single cluster that hosts test deployments for our application for the purpose of reviewing pull requests. So when a PR is created, a set of Kubernetes resources is created in the cluster (in its own namespace, named after the Git branch that the PR is for) and when the PR is merged (or deleted), the namespace is removed as the test deployment is no longer needed. But this does not automatically delete the DNS records that were created by the operator.

sabbour commented 1 year ago

@jorisscheppers can you share logs from the external-dns deployment? Replace external-dns-64b4f8fd9d-x5bth with the pod name on your cluster.

kubectl get pods -n app-routing-system | grep external-dns
kubectl logs external-dns-64b4f8fd9d-x5bth  -n app-routing-system
sabbour commented 11 months ago

@jorisscheppers is this still an issue?

sabbour commented 11 months ago

I'm closing this now. Please reach out if this is still happening.

jorisscheppers commented 10 months ago

@jorisscheppers is this still an issue?

This is still an issue but I do not have the time or resources to pursue this item any further. Consider it a suggestion for the backlog.