I could use some help solving how to write <kustom...
# kubernetes
b
I could use some help solving how to write kustomize transformations to remove a namespace object from being generated by @pulumi/kubernetes's kubernetes.kustomize.Directory where the namespace object is coming in from an upstream that is out of my control. Problem of kustomize generating the namespace object results in:
Copy code
Updating (keycloak):
     Type                                                  Name                   Status                  Info
     pulumi:pulumi:Stack                                   tkl-keycloak-keycloak  **failed**              1 error
     โ””โ”€ kubernetes:kustomize:Directory                     keycloak                                       
 +      โ”œโ”€ kubernetes:core/v1:Namespace                    keycloak               **creating failed**     1 error
๐Ÿงต
q
Copy code
transformations: [
    (obj: any, opts: pulumi.CustomResourceOptions) => {
      unset(obj.metadata.namespace)
    },
This might work
b
ooh, let me give that a try, Thank you
l
@quiet-wolf-18467 I find it confusing that the function signature for transformations on
kustomize.Directory
is different from generic Pulumi resource transformations. It took me some time to figure this out.
q
@limited-rainbow-51650 I didnโ€™t know that, let me take a look ๐Ÿ˜„