-
Notifications
You must be signed in to change notification settings - Fork 564
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
.Capabilities.APIVersions returns wrong results #1014
Comments
Upon further investigation, The documentation of this command says:
In my case, I was running Any ideas how the user experience could be improved for this use case? |
I just stumbled upon this again. My helm release is currently installed correctly. But when I run |
@a-hat Thanks for the detailed report. What would be the next action? As helm-diff depends on A possible workaround would be to provide Capabilities from helmfile/helm-diff side, like, enhancing helmfile to accept Does it make sense? |
@mumoshu There is an issue in the helm repo about adding an option to provide the Capabilities to If it is possible to implement this feature in helmfile / helm-diff, this would be a good solution. Maybe it would be possible to add an option to retrieve the actual Capabilities and passing the result to |
@a-hat Hey!
No, 3.0.1 does have the flag to set capabilities:
Hmm, I think we shouldn't do that. Say we have two releases in helmfile.yaml, the first one having a CRD, the second one has The only way to "correct" the diff in this case would be you define api-versions. Enhancing helmfile.yaml to accept |
Hi @mumoshu, So the flag I agree that manually reading the Capabilities from the API server would lead to confusing behaviour in your use case. Then the solution you proposed seems to be the best option 👍 |
Having the similar issue trying to install
Per my understanding, the proposed solution is to support |
Yes, implementing No plan yet due to my personal reason but I'll definitely review anyone's PR once submitted! |
@a-hat is this only available if declared in the
Basically I'm exploring the idea of bridging In addition to the above, it seems like |
@travisghansen Hey! The option is available in your helmfile.yaml that can be used like this: There's no support for --no-hooks and |
@mumoshu yeah I'd need apiversions as pass through as well. Want me to create 3 separate issues? |
You could already use |
@mumoshu putting that data in helmfile is less than ideal (for me anyway). I intend to use the same helmfile across disperse clusters which may or may not be at the same k8s version. |
@travisghansen Thanks for clarifying - that makes sense. To be clear, I'd still recommend specifying it from within helmfile.yaml so that your helmfile.yaml can be the source-of-truth. You'd use helmfile's "environment values" feature or helmfile.yaml template to set different apiVersions per environment. |
That's fair. In the use-case I'm currently looking at (integration with argo-cd) the number of clusters could be extremely large (fleet management type stuff). Maintaining that manually in the file directly would not be really feasible at the scale involved. I'm admittedly not using advanced features of helmfile yet however so I could be misunderstanding something. The template env var may be a feasible route especially if it can be made conditional (I think it can). In any case, pass through seems the ideal route for my crazy use case ATM. Thanks for the consideration and help! |
Hey @mumoshu! Just in case you missed it, the I am waiting for databus23/helm-diff#175 to be merged, which will fix it. |
Reading through the repo issues over there it appears to have 2 or 3 issues related to helm3 and/or API versions. I'll be keeping an eye on all this for sure. |
how to fix this now, since |
I thought I've recently introduced an option for helm-diff to let it use |
@mumoshu Can you elaborate? I see that when running The full command is generated by Helmfile, along with the temporary files it references:
Is there some additional flag that needs to get pass to helm-diff to make it use the correct values? And if so is there a way to make helmfile pass that flag? databus23/helm-diff#175 (comment) by @a-hat mentions that FWIW, here is what
You mentioned adding something "recently" but I checked the release history and didn't see anything that seemed relevant. I upgraded from helm-diff 3.1.3 to 3.4.1 but no change in observed behavior. |
@raxod502-plaid Upgrade helm-diff to a very recent version and run helmfile like I don't remember if it populated |
It turned out that the issue was actually our fault; another team member had set |
The helm built-in object
Capabilities.APIVersions
returns incorrect results when running with helmfile in my cluster.For demonstration purposes, I have the following
test.yaml
file, which prints the results fromAPIVersions
usingincubator/raw
:Here is a
helmfile.yaml
using this template:When I run
helm install test incubator/raw -f test.yaml --dry-run
I get the correct list of API Versions available in my cluster.helmfile template
outputs a different set of Versions with many entries missing.The text was updated successfully, but these errors were encountered: