konstructio / kubefirst

The Kubefirst Open Source Platform
https://kubefirst.konstruct.io/docs
MIT License
1.8k stars 142 forks source link

Deprovisioning clusters doesn't clean up DNS records #1717

Open claywd opened 1 year ago

claywd commented 1 year ago

Which version of kubefirst are you using?

2.2.2

Which cloud provider?

Civo

Which installation type?

CLI

Which distributed Git provider?

GitHub

What is the issue?

Deploying multiple clusters to civo running kubefirst civo destroy in between each run results in multiple A and txt records because dns is never cleaned up.

Code of Conduct

fharper commented 1 year ago

From @Claywd, all clouds may now have this issue.

fharper commented 1 year ago

Here's a bit more context about this issue based on a discussion I had with @johndietz.

We obviously create records when creating a cluster, at least for the applications we are installing ourselves like console, Vault... Those records are created by ExternalDNS, and not deleted when a cluster is destroyed.

With the revamp of the CLi in v2.3 (now using the API instead of its own code, easier to maintain, more stability, and closer experience between the CLI and UI cluster creation), the destroy command won't be a thing anymore. So all users we now have to deprovision manually.

With that said, we should add an additional optional step (one user may want to keep those records, for example, in a blue/green scenario) with maybe a CLI command to delete the records we set for our own installation. We will also be able to delete the one created from the v2.5 application management UI. We should note that if the users add new applications with specific records by using any other means, we won't be able to delete those, which make total sense.