creamy-forest-42826
02/19/2020, 7:35 AMpulumi preview
, we will see previous namespace in name. It's bug or wanted behavior?
Situation:
export function initPrometheusService(namespace: string) {
new k8s.yaml.ConfigGroup(
"prometheus-service-deploy",
{
files: [
join(getPath(), "tinky-winky.yaml"),
join(getPath(), "dipsy.yaml"),
join(getPath(), "laa-laa.yaml"),
join(getPath(), "po.yaml")
]
},
{
parent: aks,
transformations: [
(obj: any) => {
const metadata = obj.props?.metadata;
if (!metadata) {
return;
}
metadata.namespace = "evils";
return obj;
}
]
}
);
}
When previous namespace is telletubies and I want new namespace as evils. I will see name, which namespace as before transformation, (telletubies/RESOURCE_NAME) in preview (or pulumi up - preview part).gorgeous-egg-16927
02/19/2020, 4:31 PMobj.props?.metadata
is correct; I’d expect it to be obj.metadata
.const provider = new k8s.Provider("bar", {namespace: "bar"});
new k8s.yaml.ConfigFile("test",
{file: "secret.yaml"},
{provider}
);
creamy-forest-42826
02/20/2020, 9:58 AMpulumi 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.