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

Fix documentation for multi-cluster allocation #1235

Merged
merged 2 commits into from
Dec 18, 2019
Merged
Changes from 1 commit
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
14 changes: 8 additions & 6 deletions site/content/en/docs/Advanced/multi-cluster-allocation.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,18 +47,19 @@ To accept allocation requests from other clusters, agones-allocator for cluster

Follow the steps to configure the [agones allocator REST API service]({{< relref "allocator-service.md">}}). The client certificate pair in the mentioned document is stored as a K8s secret. Here are the secrets to set:

1. Client certificate to talk to other clusters:
1.Client certificate to talk to other clusters:

```bash
cat <<EOF | kubectl apply -f -
apiVersion: v1
kind: Secret
metadata:
name: allocator-client-to-cluster-B
namespace: cluster-A-ns
type: Opaque
data:
client.crt: <REDACTED>
client.key: <REDACTED>
tls.crt: <REDACTED>
tls.key: <REDACTED>
ca.crt: <REDACTED>
EOF
```
Expand All @@ -67,16 +68,17 @@ The certificates are base 64 string of the certificate file e.g. `cat ${CERT_FIL

`ca.crt` is the server TLS public certificate if it is self-signed. For simplicity, it is recommended to use one client secret per cluster and make `ca.crt` bundle of server certificates.

2. Add client CA to the list of authorized client certificates by agones-allocator in the targeted cluster.
2.Add client CA to the list of authorized client certificates by agones-allocator in the targeted cluster.

```bash
cat <<EOF | kubectl apply -f -
apiVersion: v1
kind: Secret
metadata:
name: allocator-client-ca
namespace: agones-system
type: Opaque
Data:
data:
client1.crt: <REDACTED>
client2.crt: <REDACTED>
Expand All @@ -96,7 +98,7 @@ FLEET_NAME=<fleet name>

curl https://${EXTERNAL_IP}:443/v1alpha1/gameserverallocation \
--header "Content-Type: application/json" \
-d '{"namespace": "'${NAMESPACE}'", "multiClusterSetting": {"enabled": true}, "requiredGameServerSelector": {"matchLabels": {"stable.agones.dev/fleet": "'${FLEET_NAME}'"}}}' \
-d '{"namespace": "'${NAMESPACE}'", "multiClusterSetting": {"enabled": true}, "requiredGameServerSelector": {"matchLabels": {"agones.dev/fleet": "'${FLEET_NAME}'"}}}' \
--key ${KEY_FILE} \
--cert ${CERT_FILE} \
--cacert ${TLS_CERT_FILE} -v
Expand Down