Modify --api-port to take a stirng argument

--api-port only takes the port as argument. This patch modifies it to
take a string argument, in the form of host:port.
This commit is contained in:
Andy Zhou 2019-06-01 15:19:41 -07:00
parent bd58e9b874
commit 1565e43365

View File

@ -96,11 +96,11 @@ func main() {
Name: "version", Name: "version",
Usage: "Choose the k3s image version", Usage: "Choose the k3s image version",
}, },
cli.IntFlag{ cli.StringFlag{
// TODO: only --api-port, -a soon since we want to use --port, -p for the --publish/--add-port functionality // TODO: only --api-port, -a soon since we want to use --port, -p for the --publish/--add-port functionality
Name: "api-port, a, port, p", Name: "api-port, a, port, p",
Value: 6443, Value: "6443",
Usage: "Map the Kubernetes ApiServer port to a local port (Note: --port/-p will be used for arbitrary port mapping as of v2.0.0, use --api-port/-a instead for setting the api port)", Usage: "Specify the Kubernetes cluster API server port (Format: `[host:]port` (Note: --port/-p will be used for arbitrary port mapping as of v2.0.0, use --api-port/-a instead for setting the api port)",
}, },
cli.IntFlag{ cli.IntFlag{
Name: "timeout, t", Name: "timeout, t",