-
Notifications
You must be signed in to change notification settings - Fork 55
Ignore namespaces when dealing with ClusterRole or ClusterRoleBindings #26
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
Comments
Thanks for reporting. I've seen this error a couple of times. The solution is to not send a namespaced Kubectl, from what I understand, silently removes the namespace for non namespaced resources. But I don't think that's the correct approach here. The provider should apply exactly what is specified in the kustomization. Not some magically altered version of it. This error most likely only surfaces during apply, not plan. So #24 may help. |
The same thing happens for manifests generated by the prometheus-operator helm chart and However, I believe the problem is in the chart. Since these resources are cluster scoped shouldn't not have a namespace field to begin with. I will file an issue to the prometheus-operator helm chart. I think @Bhashit, you should do the same for istio. |
FYI: helm/charts#22946 |
@pst Maybe one last argument: shouldn't the tools that kinda replace kubectl should also work like kubectl? |
I do understand your argument @Bhashit, but writing a Terraform provider I am in between two worlds. And this If the Prometheus helm chart mentioned by @riccardomc and |
Got it. I understand. I'll close the issue |
While installing Istio with CNI, I had a manifest generated using istioctl. The manifest incorrectly creates a ClusterRoleBinding that specifies a namespace:
This refers to another
ClusterRole
Because the
ClusterRoleBinding
specifies a namespace, it looks like this provider is trying to look for a resource in that namespace. It fails with the following error.This may be an easy fix, and I'll attempt to send a PR once I have fixed this issue from happening in my CI pipeline.
The text was updated successfully, but these errors were encountered: