traefik-helm-chart
traefik-helm-chart copied to clipboard
IngressClass not working with helm template
Hello, in chart version 9.10.1
was pushed a fix into IngressClass Resource #300
The problem is, if i try to helm template traefik/traefik --set ingressClass.enabled=true
i get this error: <fail "\n\n ERROR: You must have atleast networking.k8s.io/v1beta1 to use ingressClass">
If i try to helm template traefik/traefik --set ingressClass.enabled=true --api-versions networking.k8s.io/v1beta1/IngressClass
, it works.
The problem is, i cannot specify which --api-versions
to use because we are using ArgoCD to manage our helm installs, and Argo by default only populates --api-versions
with the Capabilities it can find.
I'm gonna use 9.10.0
for now, as it works.
Client Version: version.Info{Major:"1", Minor:"19", GitVersion:"v1.19.3", GitCommit:"1e11e4a2108024935ecfcb2912226cedeafd99df", GitTreeState:"clean", BuildDate:"2020-10-14T12:50:19Z", GoVersion:"go1.15.2", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"19", GitVersion:"v1.19.2", GitCommit:"f5743093fd1c663cb0cbc89748f730662345d44d", GitTreeState:"clean", BuildDate:"2020-09-16T13:32:58Z", GoVersion:"go1.15", Compiler:"gc", Platform:"linux/amd64"}
Same issue with managed kubernetes in DigitalOcean (DOKS), also using ArgoCD to deploy Traefik 2.3.5. Tested with 1.18-2.do and 1.19-3do
Experiencing similar issue on ArgoCD 1.8.1 deploying Traefik chart 9.11.0. I can see in ArgoCD logs that --api-versions networking.k8s.io/v1 --api-versions networking.k8s.io/v1beta1
is passed to the helm template
command, but not the specific resources within the api-version.
Helm docs seem to indicate that both the version and resource should be available through Capabilities.APIVersions. This seems like possibly a bug in ArgoCD for not presenting each resource within the apiversion.
any update on this? I am also using ArgoCD to dpeloy traefik and getting same error
As an FYI, those experiencing with that issue may add some ingressClass.fallbackApiVersion
to their values file -- k8s 1.19+ may set it to v1
, previous versions would need to use v1beta1
.
As I'm not sure how to reproduce the issue, I'll hold on to my PR ... Instead of checking for ingressClass presence in a given API, we should be able to solely rely on Kubernetes API version. Could anyone confirm or deny this issue was fixed, pulling from the following fork:
$ git clone -b fix-ingressclass https://github.com/Worteks/traefik-helm-chart
$ helm install traefik --dry-run --debug ./traefik-helm-chart/traefik --values /your/values.yml
Remove dry-run & debug to actually apply objects. If ArgoCD won't allow applying local charts, and that you have some HTTP server on your own, you should be able to package it, using:
$ helm package traefik/
$ mkdir my-repo-buildroot
$ mv ./traefik-X.Y.Z.tgz my-repo-buildroot/
$ helm repo index my-repo-buildroot --url https://my-repo-fqdn/subpath/for/helm/charts
$ scp -p my-repo-buildroot/* root@my-repo-fqdn:/var/www/subpath/for/helm/charts/
Let us know if that helps.
With PR #693, it will check only Kubernetes version.