From 537789902bac0ce92a54fa76edb8eddb4428dc78 Mon Sep 17 00:00:00 2001 From: Pavel Sviderski Date: Mon, 9 Dec 2024 17:06:33 +1000 Subject: [PATCH] update publish flag description with lb and host formats --- cmd/uncloud/service/run.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/cmd/uncloud/service/run.go b/cmd/uncloud/service/run.go index 15646f26..8310267d 100644 --- a/cmd/uncloud/service/run.go +++ b/cmd/uncloud/service/run.go @@ -50,8 +50,14 @@ func NewRunCommand() *cobra.Command { cmd.Flags().StringVarP(&opts.name, "name", "n", "", "Assign a name to the service. A random name is generated if not specified.") cmd.Flags().StringSliceVarP(&opts.publish, "publish", "p", nil, - "Publish a service port to make it accessible outside the cluster. Can be specified multiple times. "+ - "Format: [load_balancer_port:]container_port[/protocol]") + "Publish a service port to make it accessible outside the cluster. Can be specified multiple times.\n"+ + "Format: [hostname:][load_balancer_port:]container_port[/protocol] or [host_ip:]:host_port:container_port[/protocol]@host\n"+ + "Supported protocols: tcp, udp, http, https (default is tcp). If a hostname for http(s) port is not specified, a random hostname is generated.\n"+ + "Examples:\n"+ + " -p 8080/https Publish port 8080 as HTTPS via load balancer with random hostname\n"+ + " -p app.example.com:8080 Publish port 8080 as HTTPS via load balancer with custom hostname\n"+ + " -p 9000:8080 Publish port 8080 as TCP port 9000 via load balancer\n"+ + " -p 53:5353/udp@host Bind UDP port 5353 to host port 53") cmd.Flags().StringVarP( &opts.cluster, "cluster", "c", "",