m
Anyone?
m
Yes, you can use transformations to add a namespace, like this:
Copy code
def add_namespace(obj, opts):
    obj["metadata"]["namespace"] = "argocd"
Depending on your source YAML, you might have to do more filtering (e.g., if there are non-namespaced resources like namespaces or cluster roles).
s
I would also submit an issue here to ask that it be documented on how to best handle your use case (or to have
namespace
added as an input): https://github.com/pulumi/pulumi-kubernetes
d
@most-kilobyte-1525 another way to set the namespace is at the provider level. e.g. in your stack configuration (or by defining an explicit provider):
Copy code
kubernetes:namespace: argocd
I do agree that
ConfigGroup
(and similar) should have a
namespace
field, and filed: https://github.com/pulumi/pulumi-kubernetes/issues/3660