mirror of
https://github.com/jcreek/CosmicClash.git
synced 2026-09-10 16:04:04 +00:00
fix(compose): give the allocated smoke's allocator its signing key
Making cmd/allocator refuse to start without join-signing material was right -- an allocator that binds allocations it can never publish rosters for strands every match silently -- but I updated the Kubernetes manifests and the kind fixture without updating the Compose one. The allocator container exited at startup, so no allocation was ever bound and verify-allocated-compose failed with "allocator did not bind a provider allocation". Mount the same join-signing-keys.json fixture the game server already uses and name the key it was written with. Caught by running the target locally rather than by CI after a push.
This commit is contained in:
@@ -58,7 +58,11 @@ services:
|
|||||||
COSMIC_CLASH_WORKLOAD_SECRET: compose-workload-secret
|
COSMIC_CLASH_WORKLOAD_SECRET: compose-workload-secret
|
||||||
COSMIC_CLASH_KUBERNETES_TOKEN_PATH: /run/cosmic-clash/kubernetes-token
|
COSMIC_CLASH_KUBERNETES_TOKEN_PATH: /run/cosmic-clash/kubernetes-token
|
||||||
COSMIC_CLASH_KUBERNETES_CA_PATH: /run/cosmic-clash/fake-agones.crt
|
COSMIC_CLASH_KUBERNETES_CA_PATH: /run/cosmic-clash/fake-agones.crt
|
||||||
command: ["--dsn=postgres://cosmic_clash_test:cosmic_clash_test@database:5432/cosmic_clash_test?sslmode=disable", "--migrations=/opt/cosmic-clash/migrations", "--interval=1s", "--transport=enet"]
|
# The allocator signs one join authorisation per participant and publishes
|
||||||
|
# the assignment roster, so it needs the same key material the game server
|
||||||
|
# verifies with. It refuses to start without them rather than binding
|
||||||
|
# allocations that could never become joinable.
|
||||||
|
command: ["--dsn=postgres://cosmic_clash_test:cosmic_clash_test@database:5432/cosmic_clash_test?sslmode=disable", "--migrations=/opt/cosmic-clash/migrations", "--interval=1s", "--transport=enet", "--join-authorisations-key-file=/run/secrets/cosmic-clash/join-signing-keys.json", "--join-authorisations-key-id=compose-key-1"]
|
||||||
depends_on:
|
depends_on:
|
||||||
database:
|
database:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
@@ -67,6 +71,7 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- ${COMPOSE_SMOKE_DIR:-/tmp/cosmic-clash-allocated-smoke}/kubernetes-token:/run/cosmic-clash/kubernetes-token:ro
|
- ${COMPOSE_SMOKE_DIR:-/tmp/cosmic-clash-allocated-smoke}/kubernetes-token:/run/cosmic-clash/kubernetes-token:ro
|
||||||
- ${COMPOSE_SMOKE_DIR:-/tmp/cosmic-clash-allocated-smoke}/fake-agones.crt:/run/cosmic-clash/fake-agones.crt:ro
|
- ${COMPOSE_SMOKE_DIR:-/tmp/cosmic-clash-allocated-smoke}/fake-agones.crt:/run/cosmic-clash/fake-agones.crt:ro
|
||||||
|
- ${COMPOSE_SMOKE_DIR:-/tmp/cosmic-clash-allocated-smoke}/join-signing-keys.json:/run/secrets/cosmic-clash/join-signing-keys.json:ro
|
||||||
|
|
||||||
maintenance:
|
maintenance:
|
||||||
build:
|
build:
|
||||||
|
|||||||
Reference in New Issue
Block a user