From 99c928f4905cd3bf2c00df5b0ccf88ca59897638 Mon Sep 17 00:00:00 2001 From: Pasha Sviderski Date: Fri, 6 Nov 2026 12:13:27 +1000 Subject: [PATCH] fix(docs): correct published port protocol default for 'uc run' --- cmd/uc/service/run.go | 7 ++++--- website/docs/9-cli-reference/uc_run.md | 7 ++++--- website/docs/9-cli-reference/uc_service_run.md | 7 ++++--- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/cmd/uc/service/run.go b/cmd/uc/service/run.go index 838bcad1..80d507cd 100644 --- a/cmd/uc/service/run.go +++ b/cmd/uc/service/run.go @@ -106,11 +106,12 @@ func NewRunCommand(groupID string) *cobra.Command { cmd.Flags().StringSliceVarP(&opts.publish, "publish", "p", nil, "Publish a service port to make it accessible outside the cluster. Can be specified multiple times.\n"+ "Format: [hostname:]container_port[/protocol] or [host_ip|host_prefix:]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\n"+ - "and a cluster domain is reserved, service-name.cluster-domain will be used as the hostname.\n"+ + "Supported protocols: tcp, udp, http, https. The protocol defaults to https if a hostname is specified,\n"+ + "otherwise tcp. http(s) ports without a hostname use 'service-name.cluster-domain' as the default hostname\n"+ + "if a cluster domain is reserved.\n"+ "Examples:\n"+ " -p 8080/https Publish port 8080 as HTTPS via reverse proxy with default service-name.cluster-domain hostname\n"+ - " -p app.example.com:8080/https Publish port 8080 as HTTPS via reverse proxy with custom hostname\n"+ + " -p app.example.com:8080 Publish port 8080 as HTTPS via reverse proxy with custom hostname\n"+ // TODO: add support for publishing L4 tcp/udp ports. //" -p 9000:8080 Publish port 8080 as TCP port 9000 via reverse proxy\n"+ " -p 53:5353/udp@host Bind UDP port 5353 to host port 53\n"+ diff --git a/website/docs/9-cli-reference/uc_run.md b/website/docs/9-cli-reference/uc_run.md index fa472d39..07616886 100644 --- a/website/docs/9-cli-reference/uc_run.md +++ b/website/docs/9-cli-reference/uc_run.md @@ -30,11 +30,12 @@ uc run IMAGE [COMMAND...] [flags] --privileged Give extended privileges to service containers. This is a security risk and should be used with caution. -p, --publish strings Publish a service port to make it accessible outside the cluster. Can be specified multiple times. Format: [hostname:]container_port[/protocol] or [host_ip|host_prefix:]host_port:container_port[/protocol]@host - Supported protocols: tcp, udp, http, https (default is tcp). If a hostname for http(s) port is not specified - and a cluster domain is reserved, service-name.cluster-domain will be used as the hostname. + Supported protocols: tcp, udp, http, https. The protocol defaults to https if a hostname is specified, + otherwise tcp. http(s) ports without a hostname use 'service-name.cluster-domain' as the default hostname + if a cluster domain is reserved. Examples: -p 8080/https Publish port 8080 as HTTPS via reverse proxy with default service-name.cluster-domain hostname - -p app.example.com:8080/https Publish port 8080 as HTTPS via reverse proxy with custom hostname + -p app.example.com:8080 Publish port 8080 as HTTPS via reverse proxy with custom hostname -p 53:5353/udp@host Bind UDP port 5353 to host port 53 -p 192.168.76.0/24:53:5353/udp@host Bind UDP port 5353 to host port 53 on every host IP address contained in the prefix 192.168.76.0/24 diff --git a/website/docs/9-cli-reference/uc_service_run.md b/website/docs/9-cli-reference/uc_service_run.md index 06e90e89..8e556826 100644 --- a/website/docs/9-cli-reference/uc_service_run.md +++ b/website/docs/9-cli-reference/uc_service_run.md @@ -30,11 +30,12 @@ uc service run IMAGE [COMMAND...] [flags] --privileged Give extended privileges to service containers. This is a security risk and should be used with caution. -p, --publish strings Publish a service port to make it accessible outside the cluster. Can be specified multiple times. Format: [hostname:]container_port[/protocol] or [host_ip|host_prefix:]host_port:container_port[/protocol]@host - Supported protocols: tcp, udp, http, https (default is tcp). If a hostname for http(s) port is not specified - and a cluster domain is reserved, service-name.cluster-domain will be used as the hostname. + Supported protocols: tcp, udp, http, https. The protocol defaults to https if a hostname is specified, + otherwise tcp. http(s) ports without a hostname use 'service-name.cluster-domain' as the default hostname + if a cluster domain is reserved. Examples: -p 8080/https Publish port 8080 as HTTPS via reverse proxy with default service-name.cluster-domain hostname - -p app.example.com:8080/https Publish port 8080 as HTTPS via reverse proxy with custom hostname + -p app.example.com:8080 Publish port 8080 as HTTPS via reverse proxy with custom hostname -p 53:5353/udp@host Bind UDP port 5353 to host port 53 -p 192.168.76.0/24:53:5353/udp@host Bind UDP port 5353 to host port 53 on every host IP address contained in the prefix 192.168.76.0/24