Add deployment destroy command to CNG orchestrator
What does this MR do and why?
Implements cleanup via destroy
command.
Part of: gitlab-org/quality/quality-engineering/team-tasks#2570 (closed)
Closes: gitlab-org/quality/quality-engineering/team-tasks#2754 (closed)
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
❯ cng destroy deployment
Are you sure you want to delete deployment 'gitlab'? Yes
Select deployment configuration type: kind
Performing full deployment cleanup
[✔] uninstalling helm release 'gitlab' ... done
Uninstalling helm release 'gitlab' in namespace 'gitlab'
release "gitlab" uninstalled
Removing license secret
[✔] removing configuration specific objects ... done
Removing secret 'gitlab-initial-root-password'
secret "gitlab-initial-root-password" deleted
Removing configmap 'pre-receive-hook'
configmap "pre-receive-hook" deleted
[✔] removing namespace 'gitlab' ... done
Warning: deleting cluster-scoped resources, not scoped to the provided namespace
namespace "gitlab" deleted
❯ cng destroy cluster
Are you sure you want to delete cluster gitlab? Yes
Destroying cluster 'gitlab'
[✔] destroying cluster ... done
Deleting cluster "gitlab" ...
Deleted nodes: ["gitlab-control-plane"]
How to set up and validate locally
Create local deployment
$ bundle exec cng create deployment kind
Clean up deployment and cluster
$ bundle exec cng destroy deployment
$ bundle exec cng destroy cluster
Edited by Andrejs Cunskis