fix(multiplayer): propagate allocated playlist

This commit is contained in:
Josh Creek
2026-09-01 17:00:37 +01:00
parent 8bd1455a2c
commit 9ae01ecc5a
8 changed files with 24 additions and 6 deletions
+3
View File
@@ -177,6 +177,9 @@ func (c Client) Allocate(ctx context.Context, request domain.AllocationRequest,
"cosmic-clash.io/protocol": strconv.Itoa(request.Protocol),
"cosmic-clash.io/transport": request.Transport,
}
if playlist := labels["cosmic-clash.io/playlist"]; playlist == string(domain.Casual) || playlist == string(domain.Ranked) {
body.Spec.Metadata.Annotations["cosmic-clash.io/playlist"] = playlist
}
if len(c.WorkloadSecret) > 0 {
ttl := c.WorkloadTokenTTL
if ttl <= 0 {