Comments (8)
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.
@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.
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 purge
action 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.
@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.
@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.
how about renaming
helmfile delete
to [..]helmfile destroy
so that helmfile's basic use-case involveshelmfile sync
andhelmfile 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.
@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 tohelmfile delete
- Note about the common idiom of running
helmfile delete --purge && helmfile sync
to force reinstalling everything.
from helmfile.
Submitted #142 for this
from helmfile.
Related Issues (20)
- Handle SIGTERM for dependent helm processes HOT 2
- How to use needs for local helm charts deployed HOT 1
- line x: mapping key "<<" already defined at line y HOT 2
- panic: error parsing helm version 'v3.7.1+7.el8+g8f33223' HOT 1
- Helm CVE-2023-25165 HOT 2
- failed reading adhoc dependencies: unexpected format of `helm repo list HOT 1
- The best thing about this
- Exited with status 1 because of an internal system error. Our team has been notified.
- values file does not exist in "." HOT 1
- exec function passing arguments to shell script HOT 1
- Stay DRY with the environment variables HOT 1
- 4AEE18F83AFDEB23 HOT 1
- Vulnerability of dependency "github.com/hashicorp/go-getter"
- Please archive this repo if it's no longer being used HOT 2
- Getting "map has no entry for key" for some secrets files when using kms encryption HOT 1
- Possible race condition signal: killed
- Getting error messages when i run Helmsfile apply
- selector labels renders all releases within helmfiles.
- How can i pass multiple Helm values files to a Kutomized Helm Chart ? HOT 1
- Add useful hook environment variables HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from helmfile.