-
Notifications
You must be signed in to change notification settings - Fork 485
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
Kong chart cannot be deployed with ArgoCD / Kustomize #1010
Comments
I recall having the same problem and what you should look at is
this can be used like so:
This allows you to inject any api version which will be used by There has to be an option to specify that in Argo CD. |
I can't find any documentation on how to pass this to helm from an argocd application definition. Do you have an example? |
It seems that this is still an unsolved problem: argoproj/argo-cd#7291 Docs - https://argo-cd.readthedocs.io/en/stable/user-guide/helm/#build-environment - also do not mention this anyhow. I believe we can consider adding the these resource policy rules unconditionally. They'd just end up as noop in cluster that do not define those resources and will be rendered properly when used with tools like Argo. I'm not sure yet if that's the correct approach so not proposing a PR just yet. LMKWYT |
That's one way to go. I was thinking that the if statement could have an extra option in there from the values file, which is defaulted to false so it doesn't break anything. |
So it looks like you can pass the apiVersions option in if using the helmCharts section of a kustomization, which will work well enough for me. |
I'm glad you've figured it out. Can you provide a redacted snippet for future readers? |
|
Do you know how to pass this if kong is being created as an ArgoCD Application? |
Currently the kong chart template helper uses capabilities to determine if gateway api resources are installed:
{{- if or (.Capabilities.APIVersions.Has "gateway.networking.k8s.io/v1alpha2") (.Capabilities.APIVersions.Has "gateway.networking.k8s.io/v1beta1") (.Capabilities.APIVersions.Has "gateway.networking.k8s.io/v1")}}
Because of this, any deployments that use helm templating (I've tried
kustomize --enable helm
and ArgoCD) don't include the resources in the cluster role definition, so the routes don't work and the proxy logs are full of this error:E0218 17:09:52.151920 1 reflector.go:147] pkg/mod/k8s.io/[email protected]/tools/cache/reflector.go:229: Failed to watch *v1.Gateway: failed to list *v1.Gateway: gateways.gateway.networking.k8s.io is forbidden: User "system:serviceaccount:kong:kong-kong" cannot list resource "gateways" in API group "gateway.networking.k8s.io" at the cluster scope
It would be helpful to have a way of overriding this for these situations
The text was updated successfully, but these errors were encountered: