Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QOL: add onRemove to the create-cluster component to delete the k3d cluster #40

Open
zack-is-cool opened this issue Jan 26, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@zack-is-cool
Copy link
Member

zack-is-cool commented Jan 26, 2024

Is your feature request related to a problem? Please describe.

It would be cool to have the k3d cluster be deleted when doing a zarf package remove on this package. This also ties into UDS bundles, doing a uds remove

I think you'd just add an onRemove action to this component here to do a k3d cluster delete... command

Describe the solution you'd like

  • Given when this bundle is deployed via zarf or uds bundle
  • When a user either types zarf package remove or uds remove containing this package
  • Then the k3d cluster is deleted and everything is cleaned up neatly

Describe alternatives you've considered

Do it myself in a uds runner task

@zack-is-cool zack-is-cool added the enhancement New feature or request label Jan 26, 2024
@zack-is-cool zack-is-cool changed the title QOL: add onRemove to the create-cluster component to delete the k3d cluster QOL: add onRemove to the create-cluster component to delete the k3d cluster Jan 26, 2024
@zack-is-cool zack-is-cool changed the title QOL: add onRemove to the create-cluster component to delete the k3d cluster QOL: add onRemove to the create-cluster component to delete the k3d cluster Jan 26, 2024
@mjnagel
Copy link
Contributor

mjnagel commented Feb 16, 2024

I'm not entirely opposed to this, but in general it should be unnecessary and actually feels like a worse pattern than just destroying directly. On a fresh deploy of this package/a bundle including this the previous cluster will be deleted so for local dev subsequent deploys it's handled for you generally.

For cleanup locally it feels arguably longer to type out a full zarf package/bundle remove vs just k3d cluster delete <name>. In the bundle scenario (and maybe even with just the package) you'd be waiting for things to uninstall from the cluster before the eventual cluster destruction which is added wasted time.

Interested in any thoughts here, understand the desire to reduce friction but I think package/bundle removes feel like the wrong way to destroy and this would encourage that as a bad pattern.

@jeff-mccoy
Copy link
Member

yeah we actually used to do the remove, but did have some jankiness with that when deleting yourself, but generally prefer to use k3d cluster delete as the zarf action and readme currently say.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants