Some improvements in the config file example
@@ -59,38 +59,37 @@ The config file must have the following information:
Example yaml config:
```yaml
-name: pong-free-for-all # this will be the name of the kubernetes namespace
-labels:
- app: pong # several configs can refer to the same app
+name: pong-free-for-all # this will be the name of the kubernetes namespace (it must be unique)
+game: pong # several configs can refer to the same game
image: pong/pong:v123
containerPort: 5050 # port exposed in the container
protocol: UDP # supported protocols are TCP and UDP
-resources: # these will be applied directly to the pods created in kubernetes
- requests:
- memory: "64Mi"
- cpu: "250m"
- limits:
- memory: "128Mi"
- cpu: "1"
+limits: # these will be the resources limits applied to the pods created in kubernetes
+ memory: "128Mi" # they are used to decide how many rooms can run in each node
+ cpu: "1" # more info: https://kubernetes.io/docs/tasks/configure-pod-container/assign-cpu-ram-container/
autoscaling:
min: 100 # minimum amount of GRUs
up:
delta: 10 # how many GRUs will be created every time the scaling policy is triggered
trigger:
- usage: 70 # minimum usage (percentage) the can trigger the scaling policy
+ usage: 70 # minimum usage (percentage) that can trigger the scaling policy
time: 600 # time in seconds to wait before scaling policy takes place
cooldown: 300 # time in seconds to wait before consecutive scaling
down:
delta: 2 # how many GRUs will be terminated every time the scaling policy is triggered
trigger:
- usage: 50 # minimum usage (percentage) the can trigger the scaling policy
- time: 900 # time in seconds to wait before scaling policy takes place
- cooldown: 300 # time in seconds to wait before consecutive scaling
+ usage: 50 # maximum usage (percentage) the can trigger the scaling policy
+ time: 900
+ cooldown: 300
env: # environment variable to be passed on to the container
- name: EXAMPLE_ENV_VAR
value: examplevalue
- name: ANOTHER_ENV_VAR
value: anothervalue
+cmd: # if the image can run with different arguments you can specify a cmd
+ - "./room-binary"
+ - "-serverType"
+ - "6a8e136b-2dc1-417e-bbe8-0f0a2d2df431"
```
## TODOs:
