Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add port flag to example allocator-client #1618

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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