https://pulumi.com logo
#general
Title
# general
r

rich-businessperson-35436

11/28/2021, 2:06 PM
How do I specify a namespace for k8s.yaml.ConfigFile
b

billowy-army-68599

11/28/2021, 3:08 PM
you'd need to specify the namespace in the yaml, you can use a transformation if you don't have it set in there. what language are you using?
r

rich-businessperson-35436

11/28/2021, 4:42 PM
Nodejs. Trying to approximate the behavior if kubectl apply -n. So probably transformation it is. Imo not having namespace be a required parameter is asking for trouble. The default namespace is virtually never correct and most off the shelf resources will not want to explicitly code in a namespace
b

billowy-army-68599

11/28/2021, 5:51 PM
how would we define the namespace parameter in situations where the yaml has a namespace defined in it?
the
ConfigFile
resource is designed to just apply what you have
r

rich-businessperson-35436

11/28/2021, 7:46 PM
It should throw an error imo as kubectl does
b

billowy-army-68599

11/28/2021, 7:48 PM
happy to entertain a feature request here
r

rich-businessperson-35436

11/28/2021, 8:02 PM
i'd say it should probably take namespace: in the same way that helm resource does. For me, I think transforms are fine
btw sorry for the slow response today, had a power outage and got off my routine 😛
2 Views