Coder Social home page Coder Social logo

Comments (8)

mumoshu avatar mumoshu commented on August 23, 2024 1

Ah, helmfile destroy -l name=foobar would definitely work! My example wasn't good at all.

My sentiment was that we don't necessarily want to implement every possible options and flags to helmfile for purpose of supporting all the possible use-cases which can be achieved elegantly conforming the unix philosophy.

More concretely, we don't have ways to scrape rendered release names from helmfile.yml currently so it is hard to combine helmfile with external tools. Something like helmfile status -o json would allow us to combine external tools via pipes, anyway.

from helmfile.

mumoshu avatar mumoshu commented on August 23, 2024

@cmeury Thanks for the feedback!

Would you mind helping me to understand the use-case here?

Basically, helm delete without --purge only makes sense to me when you're auto-naming releases, because then you don't normally need to purge them.

However, helmfile enforces specific names to the releases. If helmfile delete enforce --purge by default, I can't just run helmfile delete && helmfile sync which is rather confusing to me.
So, back to my question, what's the use-case of leaving named releases on helmfile delete by default?

from helmfile.

cmeury avatar cmeury commented on August 23, 2024

The reason is two-fold: Firstly, I would expect helmfile to behave similar to helm, where deleting does not also purge automatically. It might surprise users who are already familiar with Helm. Secondly, purging removes all release history, which, while certainly convenient, does not make it a good default behavior.

But since I know how convenient the current behaviour is, I was suggesting adding an actual top-level purgeaction instead of as an argument to delete. So, instead of helmfile delete && helmfile sync, you would just run helmfile purge && helmfile sync.

But I totally understand if you're not convinced by this, no hard feelings :)

from helmfile.

mumoshu avatar mumoshu commented on August 23, 2024

@cmeury First of all, thanks for very informative response and the feedback as always!

I do believe that I understand the friendliness of helmfile purge for experienced helm users.
On the other hand, I don't want to replicate (potentially) all the helm sub-commands to helmfile, especially when the job was just running helm sub-command for each release.

So, how about renaming helmfile delete to something else, doesn't conflict with helm delete so that helm users won't confuse it with regular helm sub-command's semantic? Probably helmfile destroy so that helmfile's basic use-case involves helmfile sync and helmfile destroy. helmfile up vs helmfile down also sounds sweet to me.

Anyway, a deprecation warning for helmfile delete would be necessary in order to make existing helmfile users happy!

from helmfile.

mumoshu avatar mumoshu commented on August 23, 2024

@cmeury I understand there are use-cases that you'd want to just run a specific helm sub-command for each release helmfile manages, in general.

For that, how about adding e.g. helmfile status -o json on top of #27 so that you could do e.g.

helmfile status -o json | jq '.[].name' | xargs -n 1 helm delete --purge

to run arbitrary helm sub-command for each release in oneshot.
Yes, I love unix philosophy ☺️

from helmfile.

cmeury avatar cmeury commented on August 23, 2024

how about renaming helmfile delete to [..] helmfile destroy so that helmfile's basic use-case involves helmfile sync and helmfile destroy.

This sounds very reasonable. Maybe a third contributor could weigh in here to reach a certain quorum. And yes, deprecation warning makes sense.

For that, how about adding e.g. helmfile status -o json on top of #27 ..

I am not quite sure why I would do that if we can just:

helmfile destroy -l name=foobar

But now that I think about it, maybe we need to be able to select not only on labels but on status? Then it might actually work like this:

helmfile destroy --failed

from helmfile.

mumoshu avatar mumoshu commented on August 23, 2024

@cmeury I re-read your proposal in the middle of this thread and reconsidered several times. I now realize helmfile purge(reflects helm delete --purge hence more friendly to helm users) or even helmfile delete --purge sounds better to me than helmfile destroy.

So, I'd rather do:

  • Revert #34
  • Add --purge option to helmfile delete
  • Note about the common idiom of running helmfile delete --purge && helmfile sync to force reinstalling everything.

from helmfile.

mumoshu avatar mumoshu commented on August 23, 2024

Submitted #142 for this

from helmfile.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.