pulumi / pulumi-kubernetesx

Kubernetes for Everyone
Apache License 2.0
135 stars 16 forks source link

Allow *.createService to specify metadata #52

Open lblackstone opened 4 years ago

lblackstone commented 4 years ago

The createService verb on Deployment, etc should have the ability to set metadata on the created Service.

renannprado commented 3 years ago

I've just faced the same need.

The service createService doesn't take the namespace of the Deployment into consideration while creating the service. Which causes the service to be created in the default namespace. So I cannot use the method as is, unfortunately.

Edit:

Even changing the metadata after calling createService doesn't change the namespace. But on this one I guess that's just how Pulumi behaves normally.

const service = deployment.createService();
service.metadata.namespace = homeNamespace.metadata.name
Jacse commented 3 years ago

We need some services to have fixed names because other deployments depende on them. This would help us achieve that.