-
Notifications
You must be signed in to change notification settings - Fork 7k
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
helm3 resource types not available in for APIVersion Capability queries during template command #9088
Comments
ah sorry, that |
Does that help? |
So it was something I was missing. Thank you for the quick reply and help! |
thanks, I haven't understood the usage of "--api-versions" as well, as I thought using "--api-versions=v1.17.0" would have produced matching values in .Capabilities.KubeVersion and .Capabilities.APIVersions while I seem to get "v1.18.0" whatever I do |
I think I was confused by this which seems to be wrong https://github.com/rikatz/kubepug#example-of-usage-in-ci-with-github-actions
can this be a feature request? getting all the api versions of a specific kubernetes version as an additional --k8s-version flag in helm too? |
According to [Helm documentation](https://helm.sh/docs/chart_template_guide/builtin_objects/), the built-in object `Capabilities.APIVersions.Has` should be able to check Kubernetes API Versions (as its name suggests) and API Resources ... As mentionned in [this issue](helm/helm#9088): > `helm template` somehow does not fetch "resource types" during usage of `.Capabilities.APIVersions.Has` queries. I have tried to update the whole "stack" to the latest version: * `helm`: 3.2.0 -> 3.11.2 * `helm-git` plugin: 0.14.2 -> 0.15.1 But ran into multiple succesive issues ... * Needed additonnal options for `helm-git` to be able to use this git based helm repo * Helm wants to use the new "gke-gcloud-auth-plugin" for diffing * ... Therefore, I have removed the "Resource" format in the `Capabilities.APIVersions.Has` condition to rely only on the API Versions. I think it should be enough to be able to apply the changes now, since this chart is alread a deprecated one...
According to [Helm documentation](https://helm.sh/docs/chart_template_guide/builtin_objects/), the built-in object `Capabilities.APIVersions.Has` should be able to check Kubernetes API Versions (as its name suggests) and API Resources ... As mentionned in [this issue](helm/helm#9088): > `helm template` somehow does not fetch "resource types" during usage of `.Capabilities.APIVersions.Has` queries. I have tried to update the whole "stack" to the latest version: * `helm`: 3.2.0 -> 3.11.2 * `helm-git` plugin: 0.14.2 -> 0.15.1 But ran into multiple succesive issues ... * Needed additonnal options for `helm-git` to be able to use this git based helm repo * Helm wants to use the new "gke-gcloud-auth-plugin" for diffing * ... Therefore, I have removed the "Resource" format in the `Capabilities.APIVersions.Has` condition to rely only on the API Versions. I think it should be enough to be able to apply the changes now, since this chart is alread a deprecated one...
Output of
helm version
:Output of
kubectl version
:Cloud Provider/Platform (AKS, GKE, Minikube etc.):
on-premise
Introduction
I am currently running into some specific problems deploying helm charts on a kubernetes 1.18.6 cluster. These problems can be broken down to the fact that,
helm template
somehow does not fetch "resource types" during usage of.Capabilities.APIVersions.Has
queries.Details
Some in-depth details about the problem and my analysis steps:
1.18.6
Kubernetes cluster. This works just fine, but I had some trouble installing specific charts with enabled ingress option. Specifically f.e. Gitea - see their ingress templateif .Capabilities.APIVersions.Has "networking.k8s.io/v1"
function to differentiate between 1.19, 1.18 and older Kubernetes API versions and their ingress implementation. In this case, Kubernetes 1.18 API usesnetworking.k8s.io/v1beta1
and with Kubernetes 1.19 API it is switching tonetworking.k8s.io/v1
networking.k8s.io/v1
despite using Kubernetes 1.18 - seeif .Capabilities.APIVersions.Has "networking.k8s.io/v1"
IS and SHOULD be true, as1.18
is supporting networking.k8s.io/v1/NetworkPolicy. Unfortunately this breaks creation of Ingress Objectsif .Capabilities.APIVersions.Has "networking.k8s.io/v1/Ingress"
however this seems to not work with the current helm v3 version. See the example data belowI have stumbled upon this PR which should actually make it possible to use the ressource types, right?
And it also says so in the documentation
Data to recreate
values.yaml:
templates/ingress.yaml:
Testing:
$ helm template testingress ./ --- # Source: ingresstest/templates/ingress.yaml apiVersion: extensions/v1beta1 kind: Ingress
Any thoughts on this? Am I missing something completely here?
I would like to add a PR for the external helm charts to actually use the resource type in their
.Capabilities.APIVersions.Has
queries, but this obviously requires it to work in the first place :)I also tried to play around with
helm template --api-versions
but to be honest, I did not fully understand how to use it. Adding anything there just didn't change the output at all.The text was updated successfully, but these errors were encountered: