Document the namespace format for expose CLI command

This commit is contained in:
Kyle Havlovitz 2020-06-05 15:47:03 -07:00
parent 7069150ee1
commit 05a8f4d95a
2 changed files with 15 additions and 9 deletions

View File

@ -37,16 +37,18 @@ type cmd struct {
func (c *cmd) init() {
c.flags = flag.NewFlagSet("", flag.ContinueOnError)
c.flags.StringVar(&c.ingressGateway, "ingress-gateway", "",
"The name of the ingress gateway service to use. Required.")
"(Required) The name of the ingress gateway service to use. A namespace "+
"can optionally be specified as a prefix via the 'namespace/service' format.")
c.flags.StringVar(&c.service, "service", "",
"The name of destination service to expose. Required.")
"(Required) The name of destination service to expose. A namespace "+
"can optionally be specified as a prefix via the 'namespace/service' format.")
c.flags.StringVar(&c.portRaw, "port", "",
"The listener port to use for the service on the Ingress gateway. Required.")
"(Required) The listener port to use for the service on the Ingress gateway.")
c.flags.StringVar(&c.protocol, "protocol", "tcp",
"The protocol for the service. Defaults to 'tcp'. Optional.")
"The protocol for the service. Defaults to 'tcp'.")
c.http = &flags.HTTPFlags{}
flags.Merge(c.flags, c.http.ClientFlags())

View File

@ -33,14 +33,18 @@ Usage: consul connect expose [options]
#### Expose Options
- `-ingress-gateway` - The name of the ingress gateway service to use. Required.
- `-ingress-gateway` - (Required) The name of the ingress gateway service to use.
A namespace can optionally be specified as a prefix via the
'namespace/service' format
- `-port` - The listener port to use for the service on the Ingress gateway.
Required.
- `-port` - (Required) The listener port to use for the service on the Ingress
gateway.
- `-protocol` - The protocol for the service. Defaults to 'tcp'. Optional.
- `-protocol` - The protocol for the service. Defaults to 'tcp'.
- `-service` - The name of destination service to expose. Required.
- `-service` - (Required) The name of destination service to expose. A namespace
can optionally be specified as a prefix via the 'namespace/service'
format.
## Examples