-
Notifications
You must be signed in to change notification settings - Fork 280
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
Allow chart versioning #34
Allow chart versioning #34
Conversation
We rename the existing version flag and re-use the existing helm version flag. This allow helm-diff to seamlessly work with other helm tooling such as helmfile
a093cc2
to
f08186d
Compare
@databus23 can we get this merged? thoughts? We've been using this in production at reddit for a while now and it works fairly well. |
@databus23 this is a ticket that the https://github.com/roboll/helmfile project is waiting on |
This looks like a duplicate of #1 |
@databus23 this is a PR that implements #1 |
Sorry I meant duplicate of #3 |
Looks like #3 also implements this, but in a different way |
@databus23 I would think the |
I'm fine with adding this feature in general. I don't like repurposing existing flags. Does it have to be What I like about the |
I don't think using So from reading the other issues it looks like you have 2 requests.
Current syntax If you are willing to break the current syntax I think it would make sense to differentiate these things.
vs
Either syntax should work, but I think the second syntax would be easier to deal with in code. |
@foklepoint @benlangfeld @mumoshu any opinions on the syntax |
What would the long-form versions of your proposed |
|
I'm happy with that, but you guys know best. |
@benlangfeld ya, just trying to have the discussion so we can get some PR in to resolve this issue as this feature is much needed for anyone using helmfile. |
So the idea behind reusing —version and -v is that helm uses those flags to indicate chart versions. As horrible as this is, helm makes its plugins a sub command of helm even though it is a separate program all together. As a sub-command, we should respect the flags of the parent program and work as seamlessly as possible with it. I understand that it might make more sense to go down the route of using chart@version and all, but I think that’s something we should discuss with helm upstream first. Regarding your point about version with a local flag, i totally agree it doesn’t make sense to have versions on local flags, but this is currently a weird issue with helm itself. At the very least we stay as close to helms functionality as possible, even though an improved syntax might help in this case. Lastly, programs like helmfile allow diff functionality through the use of this plugin. Helmfile also simply passes down the -v flag with the expectation that the plugin respects helm’s flags. If find ourselves moving away from this syntax, some minor coordination with other plugins in this eco system would be greatly appreciated. All in all I think as a sub-command, we should be respecting the parent programs flags as much as possible. |
@foklepoint I would be fine with that. If that's the case we should have a If implemented that way it would leave the diffing between releases to some other mechanism. @databus23 opinions |
Yep that’s fair. I originally tried going that way but couldn’t get the flag/subcommand parsing to work easily so gave up :x |
So if we keep @foklepoint direction we could have
|
@sstarcher Looks awesome to me. And a |
@databus23 Do you worry about the backward compatibility of the So, it seems like:
vs
|
Ok, after some thought I'm now actually for using Here is my proposal:
I think without adding subcommands it will be difficult to add support for diffing revisions which has been requested a few times by now. Aliasing the root command to Any comments on that? |
@databus23 I think that all makes great sense. @foklepoint would you be able to implement the |
I'm offering to restructure the cli code to add the subcommands and alias (it requires bumping cobra and pflag to get spf13/cobra#295) if the majority is fine with the proposal. |
@databus23 I'm 100% on board with your proposal I think it makes the most sense. |
@databus23 Fine with your proposal, feel free to take over this PR if you need to. I don't have enough cycles to address the changes proposed here in the short term, but we'd definitely love to start using upstream helm-diff again :) |
I pushed the proposed changes to master ( Would anybody care to test this and give some feedback if they see any problem with it, especially in regards to backward compatibility? |
@databus23 looks like
|
Tested out |
also |
@sstarcher That is expected. I added this encourage people to the the new subcommand but the command should still work. Is the command exiting cleanly? Then you maybe just have an empty diff. |
So to clarify: |
@databus23 yep, my mistake I assumed it existed with a error, but you are correct. It all LGTM. |
@databus23 ahh the issue I saw was a different issue. Looks like helm diff does not work work helm s3
I'll open a separate ticket |
@foklepoint I believe this should now be closed due to the changes added to master |
I believe this has been fixed by a536dfc and is shipped since version 2.9.0+1 of this plugin. |
We rename the existing version flag
and re-use the existing helm version flag.
This allow helm-diff to seamlessly work with
other helm tooling such as helmfile