pulumi / pulumi-kubernetesx

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

Feature: Add URL helper to kx.Service #41

Open lblackstone opened 4 years ago

lblackstone commented 4 years ago

It might be useful to include a helper method that generates a complete URL for a Service.

Something along the lines of:

export const url = service.url( { port: "http" });
url: "http://localhost:80"

Currently this can be accomplished manually with something like

export const endpoint = pulumi.interpolate`http://${service.endpoint}:${service.spec.ports[0].targetPort}`;