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

green-london-79864

09/27/2018, 3:41 PM
Quick question here - according to the Kubernetes NodeJS doc, when I create a new deployment using
new k8s.apps.v1.Deployment(name: "some-name")
, shouldn't
some-name
become the resource name? Why does it become appended by a random string?
s

sparse-insurance-40223

09/27/2018, 4:09 PM
if you set the name property in the metadata block it will respect it but you have to check for uniqueness yourself after that
c

creamy-potato-29402

09/27/2018, 4:22 PM
Autonaming allows us to improve the replacement semantics of kubernetes resources. So for example, if a config map's data is updated, pulumi can create a new config map, then update all pods to use the new version, and then only if that succeeds, delete the old one.
Kubectl, in contrast, will simply update the data in place which does NOT trigger a rollout among deployments that reference it.
So overall, this is actually a huge win.