Closed bogdando closed 1 year ago
I guess you misunderstand what override_namespace
is, override_namespace
is to override namespace for the resource itself, in your case, it is to add namespace to ClusterRoleBinding
(although it does not have namespace).
So if you want to deploy the 2 yamls into a different namespace, you have to change roleRef
to match the namespace.
When deploying setup-csi-snapshotter and rbac-snapshot-controller with
kube_manifest
provider, itsoverride_namespace
does not change, nor adds the wanted namespace value for roleRef/subjects. Resources end up created with mismatching ns, and controller fails to locate its RBAC definitions:Also
Then the controller errors out like:
Please excuse me not providing a reproducer, but my code link where I hit by this. For my case, I can w/a that as I have introduced there a facility for merging patches (almost like
kubectl patch
, but at terraform layer, before the merged data gets to the k8s API server). But in general, this is a problem for the provider users.