-
Notifications
You must be signed in to change notification settings - Fork 292
support helm 3 using exec #151
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
Conversation
Yeah I'm thinking that this has been moved to something like
I guess this is a bug in helm3 as
|
@jonasrutishauser Thanks a lot for your contribution! This looks good to me. @databus23 I think this is awesome at least as the starter/foundation to further improvements. Would you mind taking a look, too? |
Just submitted the fix for |
So As for the EDIT: So we already output hooks as part of the default output in Helm 2, so the desired behavior is as @mumoshu suggests, correct? Just have a way to exclude hooks if so desired |
@thomastaylor312 Thanks a lot for your effort
Yep you are correct! And that's exactly what I did in helm/helm#6444 |
Hi sorry for being super late to the party! I'll start reviewing this now. As we shell out to Sorry again for delay. |
@databus23 I think we may actually be binding the same config flags to Helm soon, which should fix that issue. I'll get back to you when I figure it out |
This PR is the one: helm/helm#6508 Also, the namespace flag should definitely work for helm 3. Is this beta 3 that you are running? |
@thomastaylor312 @jonasrutishauser Have you tested your PR against a different namespace then |
Yeah, we aren't passing down namespace or context from helm into the plugin. If this is something that needs to be passed down, let's open an issue in Helm and I'll tag it properly |
Ah good finding. I think anything related to tiller(kubeconfig, kubecontext, namespace=tiller-namespace) except connection options(port, tls, etc.) should be propagated to plugins via envvars. In helm 2 plugins are given those configs implicitly via TILLER_HOST and the local proxy to tiller started by helm for the plugin. And I believe the only viable option is passing via envvars, as other options like helm calling a plugin with |
I believe This leaves passing |
it seems the flag processing for the plugins was changed so that I don't really understand how this is supposed to work. the main binary still exposes |
34fffd9
to
b148ab2
Compare
I updated the PR to support It needs the following PRs merged in helm: |
- uses 'helm template' for update - uses 'helm get' to retrieve releases and revisions
b148ab2
to
a990cba
Compare
Reading helm/helm#6508 (comment), I noticed that |
@mumoshu yeah, we should open a proper issue upstream to pass kubecontext and kubeconfig (probaply as |
@databus23 Thanks for confirming! I just opened helm/helm#6631 for that. Does it look ok to you? |
@jonasrutishauser @databus23 Perhaps the remaining things to do would be adding
|
I think they must not be added, as they should be picked by helm from the environment. There is a bigger problem as not all arguments are consistently removed by helm3. The only environment variable we need to read is |
@jonasrutishauser Let me confirm - Without |
The other parameters are only needed to communicate with the cluster. |
@jonasrutishauser Ah, so in other words, you're willing to pass-through Then, do you think helm/helm#6657 needs to be merged before helm v3 becomes GA? The current situation seems like the PR is considered just a nice-to-have because it has no 3.0.0-beta.5 milestone set by the helm maintainers. |
@mumoshu I am still working on looking through everything and understanding the behavior change. If we need to pull it in we will! |
I think this PR should now work with the next 3.0.0-beta.5 release. The only flag in helm 3 mode no longer provided is |
|
Signed-off-by: Jonas Rutishauser <[email protected]>
622370b
to
2448af6
Compare
@thomastaylor312 @jonasrutishauser Thanks a lot for your continued efforts! As it seems all green now, I'll take some time for manual testing on my end, and will proceed merging this shortly. |
works in my short local tests. Thanks so much for this @jonasrutishauser and @mumoshu! |
Here is an other version for #147 which shells out to
HELM_BIN
.The following helm commands are used:
helm template
for updatehelm get
to retrieve releases and revisionsThe following flags are not supported in helm 3 mode:
--set-file
inupgrade
--no-hooks
inupgrade
(helm template
in v3.0.0-beta.3 ignores this flag and returns always no hooks)--include-tests
in all commands as we ignore all hooksIt would be possible to get the hooks for the installed releases/revisions if it is really needed.