feat: enable cert rotation for allocation API service (fixes #422)#507
feat: enable cert rotation for allocation API service (fixes #422)#507dgkanatsios merged 5 commits intomainfrom
Conversation
Add CertificateWatcher that polls TLS cert files for changes and reloads them dynamically. Refactor AllocationApiServer to use GetCertificate/GetConfigForClient callbacks instead of static cert bytes. Mount tls-secret as volume for file-based cert access. Closes #422 Co-authored-by: dgkanatsios <8256138+dgkanatsios@users.noreply.github.com> Agent-Logs-Url: https://github.com/PlayFab/thundernetes/sessions/3528b7ff-34c9-4621-a98f-b9b8427da515
Co-authored-by: dgkanatsios <8256138+dgkanatsios@users.noreply.github.com> Agent-Logs-Url: https://github.com/PlayFab/thundernetes/sessions/3528b7ff-34c9-4621-a98f-b9b8427da515
Co-authored-by: dgkanatsios <8256138+dgkanatsios@users.noreply.github.com> Agent-Logs-Url: https://github.com/PlayFab/thundernetes/sessions/3528b7ff-34c9-4621-a98f-b9b8427da515
|
@copilot can you check why the unit test failed? it's not because of this PR, wondering if there's a race condition bug somewhere |
…r name deduplication The port_registry_test.go had two race conditions in the parallel allocation test: 1. First block (line 434-438): Used Load() to check if a name existed, then Store() to claim it - a TOCTOU race where two goroutines could both see the name as unclaimed and both proceed. 2. Second block (line 497): Had no name deduplication at all, so random name collisions with existing entries caused "ports already assigned for this GameServer" errors. Fix: Use sync.Map.LoadOrStore() in both blocks to atomically claim the generated name, preventing any possibility of duplicate registration. Co-authored-by: dgkanatsios <8256138+dgkanatsios@users.noreply.github.com> Agent-Logs-Url: https://github.com/PlayFab/thundernetes/sessions/677c2bb3-f657-4a37-a811-3b14c993038a
Yes, it's a pre-existing race condition in
Fix: replaced both blocks with |
port_registry_test.goparallel allocation blocksLoadOrStorefor name deduplication⚡ Quickly spin up Copilot coding agent tasks from anywhere on your macOS or Windows machine with Raycast.