So I'm trying to move a helm chart provisioned usi...
# general
d
So I'm trying to move a helm chart provisioned using pulumi to a different namespace, the helm chart includes a cluster role binding and it already exists, this is making pulumi fail with this message:
Copy code
kubernetes:<http://rbac.authorization.k8s.io:ClusterRoleBinding|rbac.authorization.k8s.io:ClusterRoleBinding> (monitoring/kube-state-metrics):
    error: Plan apply failed: <http://clusterrolebindings.rbac.authorization.k8s.io|clusterrolebindings.rbac.authorization.k8s.io> "kube-state-metrics" already exists
Is this a known issue ? If not how do I get over this ? I know I can manually delete the kube-state-metrics binding
g
This is likely related to https://github.com/pulumi/pulumi-kubernetes/issues/520 - we’re currently working on fixes for several related issues. Current workaround would be removing the resource and then recreating in the new namespace.
d
Okay thanks. Is it part of the current milestone ?
g
Yes, and fixes are in progress
👍 1
c
If you have a namespace tranformation, that's could be an issue, because ClusterRoleBinding is namespace independent, but when adding namespace to it, pulumi will use that during naming, so changing the namespace, force recreate the resource, we had the same problem, recreated it without the namespace, so next time we won't have this problem and made our transformation code a little bit smarter
d
When you say recreated without a namespace, you mean it went into the default or whatever the helm chart put as default for namespace ? @cold-coat-35200
c
Recreated without the metadata.namespace field, so it went to whatever kubernetes put cluster wide resources, but with this change the pulumi does not contained the namespace anymore
d
Okay got it