-
Notifications
You must be signed in to change notification settings - Fork 823
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test fleet, allocator-client, and custom 'players' per game server co…
…unter metric to test allocation for replicating issue #3992
- Loading branch information
Showing
7 changed files
with
170 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/bash | ||
|
||
# Get the key, cert, and tls files from "Send allocation request" instructions | ||
# https://agones.dev/site/docs/advanced/allocator-service/ | ||
NAMESPACE=default | ||
EXTERNAL_IP=$(kubectl get services agones-allocator -n agones-system -o jsonpath='{.status.loadBalancer.ingress[0].ip}') | ||
KEY_FILE=client.key | ||
CERT_FILE=client.crt | ||
TLS_CA_FILE=ca.crt | ||
|
||
echo "Starting go runs" | ||
|
||
for _ in {1..10000}; do | ||
go run ../examples/allocator-client/main.go \ | ||
--ip "${EXTERNAL_IP}" \ | ||
--port 443 \ | ||
--namespace "${NAMESPACE}" \ | ||
--key "${KEY_FILE}" \ | ||
--cert "${CERT_FILE}" \ | ||
--cacert "${TLS_CA_FILE}" | ||
done | ||
|
||
echo "All done" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
--- | ||
# Copyright 2020 Google LLC All Rights Reserved. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
apiVersion: agones.dev/v1 | ||
kind: Fleet | ||
metadata: | ||
name: simple-game-server | ||
spec: | ||
replicas: 300 | ||
template: | ||
metadata: | ||
labels: | ||
version: "1.2.3" | ||
spec: | ||
ports: | ||
- name: default | ||
containerPort: 7654 | ||
counters: | ||
players: | ||
capacity: 300 | ||
template: | ||
spec: | ||
containers: | ||
- name: simple-game-server | ||
image: us-docker.pkg.dev/agones-images/examples/simple-game-server:0.35 | ||
resources: | ||
requests: | ||
memory: 32Mi | ||
cpu: 10m | ||
limits: | ||
memory: 32Mi | ||
cpu: 10m |