This message was deleted.
# kubernetes
s
This message was deleted.
b
hey, I'm assuming here you're using the word "app" to reference a Pulumi app? I would use a stack reference here. You don't want to use an import statement because then you'll have two pulumi apps managing the same namespace. https://www.pulumi.com/docs/intro/concepts/organizing-stacks-projects/#inter-stack-dependencies
a
Thanks @billowy-army-68599 for the reply! I could use a stack reference, but that would require "something" to run first, to create the reference in the first place. What I'm probably trying to do is not aligned with the "pulumi" approach because you wouldn't know deterministically what stack a resource (in this example, a k8s namespace) was created in.
We do create our core infra (cluster) in one stack and deploy apps into the cluster in other stacks, which all depend on the cluster stack and the kube config created in it.
b
my personal suggestion is to put the NS creation into a third distinct stack and always run that first, but that maybe not what you want
a
I was expecting that I would have to do that. Then we know deterministically where the ns was created. I just was hoping more for an idempotent operation that just makes sure the ns exists, regardless of where it was created.