pulumi / pulumi-kubernetesx

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

Ability to add/modify labels on a service #76

Open ColeSiegelTR opened 2 years ago

ColeSiegelTR commented 2 years ago

Hi,

I'd like to add labels to my kubernetes service, but I don't see this available in kx.Deployment.createService

I tried to work around it with the code below but it had no effect:

service.metadata.labels = {
            ...this.service.metadata.labels,
            "app": this.name
        } as any;

Any suggestions? Lots of other features require specific labels to be set on the service, for scoping purposes.

Thanks in advance!

ColeSiegelTR commented 2 years ago

Or if the service can inherit labels from deployment somehow, this would also solve my problem

cdgn-coding commented 1 year ago

Hi, this would be a very useful feature for ClusterIP services. I wonder if the owners are open for a pull request.