Skip to content

Commit

Permalink
Add port flag to example allocator-client (#1618)
Browse files Browse the repository at this point in the history
* Add port flag to example allocator-client

* Add to docs

Co-authored-by: Mark Mandel <[email protected]>
  • Loading branch information
Robbie Heywood and markmandel authored Jun 8, 2020
1 parent ba5877c commit 6cacbf7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion examples/allocator-client/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,13 @@ func main() {
certFile := flag.String("cert", "missing cert", "the public key file for the client certificate in PEM format")
cacertFile := flag.String("cacert", "missing cacert", "the CA cert file for server signing certificate in PEM format")
externalIP := flag.String("ip", "missing external IP", "the external IP for allocator server")
port := flag.String("port", "443", "the port for allocator server")
namespace := flag.String("namespace", "default", "the game server kubernetes namespace")
multicluster := flag.Bool("multicluster", false, "set to true to enable the multi-cluster allocation")

flag.Parse()

endpoint := *externalIP + ":443"
endpoint := *externalIP + ":" + *port
cert, err := ioutil.ReadFile(*certFile)
if err != nil {
panic(err)
Expand Down
1 change: 1 addition & 0 deletions site/content/en/docs/Advanced/allocator-service.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ CERT_FILE=client.crt
TLS_CA_FILE=ca.crt

go run examples/allocator-client/main.go --ip ${EXTERNAL_IP} \
--port 443 \
--namespace ${NAMESPACE} \
--key ${KEY_FILE} \
--cert ${CERT_FILE} \
Expand Down

0 comments on commit 6cacbf7

Please sign in to comment.