Repository navigation
Expand file tree
/
Copy pathfleet-domain.yaml
More file actions
56 lines (52 loc) · 2.11 KB
/
Copy pathfleet-domain.yaml
File metadata and controls
56 lines (52 loc) · 2.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# Fleet manifest — Gateway API backend, domain routing mode.
#
# Each game server gets its own subdomain: https://[gameserver-name].game.example.com
#
# The controller creates one HTTPRoute per game server pointing to the shared Gateway.
# TLS is terminated at the Gateway listener using the wildcard certificate — see certificate.yaml.
#
# Before applying:
# 1. Apply gateway.yaml and certificate.yaml
# 2. Replace "game.example.com" with your domain
# 3. Replace "gateway" with the name of your Gateway resource if different
# 4. Update DNS: add a wildcard A/CNAME record *.game.example.com -> Gateway external IP
apiVersion: "agones.dev/v1"
kind: Fleet
metadata:
name: octops-gateway-domain
spec:
replicas: 3
template:
metadata:
annotations:
# Select the Gateway API backend instead of Ingress
octops.io/router-backend: "gateway"
# Name and namespace of the pre-existing Gateway resource
octops.io/gateway-name: "gateway"
octops.io/gateway-namespace: "octops-gateway"
# Listener name inside the Gateway (must match spec.listeners[].name in gateway.yaml)
# Use "https" when a TLS certificate is configured on the Gateway listener.
octops.io/gateway-section-name: "http"
# Routing mode: each game server gets its own subdomain
octops.io/gameserver-ingress-mode: "domain"
octops.io/gameserver-ingress-domain: "game.example.com"
# Custom annotations are forwarded to the HTTPRoute (octops- prefix is stripped)
# octops-example.com/my-annotation: "my-value"
spec:
ports:
- name: default
containerPort: 8088 # port the HTTP game server listens on (see examples/gameserver-http/main.go)
protocol: TCP
template:
spec:
containers:
- name: gameserver
image: octops/gameserver-http:latest
# image: gcr.io/agones-images/udp-server:0.21
resources:
requests:
memory: "64Mi"
cpu: "20m"
limits:
memory: "64Mi"
cpu: "20m"