This message was deleted.
# kubernetes
s
This message was deleted.
g
I would expect you to see something along these lines during preview
It may be a problem with your transformation. I’m not sure
obj.props?.metadata
is correct; I’d expect it to be
obj.metadata
.
Note that instead of changing the namespace with a transformation, you can set a default namespace on a Provider, and any resources using that Provider will use that namespace if one is not already set.
Copy code
const provider = new k8s.Provider("bar", {namespace: "bar"});

new k8s.yaml.ConfigFile("test",
    {file: "secret.yaml"},
    {provider}
);
c
@gorgeous-egg-16927 I see create BEFORE_TRANSFORMATION_NS/secret name during preview. After
pulumi up
in kubectl is used correct (after transformation) namespace. I tried add console.log in transformation function and it shown log info correctly. Provider default namespace is not right way for us.