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

damp-book-35965

03/13/2019, 8:37 PM
Question: When I create a namespace using this:
Copy code
const ns = new k8s.core.v1.Namespace("test", {}, { provider: cluster.provider });
Why does it create it as
test-zu7jbnvc
Is it possible to keep it as test only ?
g

gentle-diamond-70147

03/13/2019, 8:53 PM
This is the auto-naming functionality within Pulumi. https://pulumi.io/reference/programming-model.html#autonaming
You can usually specify a
name
attribute within the arguments block to override this.
c

cool-egg-852

03/13/2019, 9:25 PM
@gentle-diamond-70147 Any plan to allow this to be disabled?
We ran into this ourselves. It’s a little weird to have to name everything twice
d

damp-book-35965

03/13/2019, 9:38 PM
Thanks @gentle-diamond-70147 Will try it out
@gentle-diamond-70147 dumb question but how do I actually specify this ?
g

gentle-diamond-70147

03/13/2019, 11:32 PM
@damp-book-35965 this should do it...
Copy code
const ns = new k8s.core.v1.Namespace("test", {
    metadata: { name: "test" }
}, { provider: cluster.provider });
@cool-egg-852 I think no near-term plans. I was going to link you to the GitHub issue about this but I see you already commented on it. 🙂
d

damp-book-35965

03/13/2019, 11:36 PM
Thanks Cameron