Conversation
GameServerWatcher wires fabric8's SharedIndexInformer for the Agones GameServer CRD, translates events through GameServerExtractor, and dispatches to onUpsert / onDelete callbacks supplied at construction. Mode handling: - PLATFORM: scoped to one namespace (the configured selector) - STAGING: cluster-wide watch with client-side filter on the `preview-*` namespace prefix (fabric8 has no server-side glob) Resilience: - One bad event is logged WARN and skipped; the informer keeps running - start() guards against double-start; stop() is idempotent - Built-in informer reconnect handles k8s API blips 7 integration tests via fabric8's KubernetesMockServer (@EnableKubernetesMockClient(crud = true)) cover add/update/delete event flow, mode-based namespace filtering, malformed-event skip, multi-fleet visibility, and stop-idempotency. Awaitility used for async assertions (5s ceiling). Adds testImplementation: fabric8 kubernetes-server-mock + mockwebserver, awaitility 4.2.2; testRuntimeOnly slf4j-simple so log statements during tests don't blow up.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
GameServerWatcherwraps fabric8'sSharedIndexInformerand translates events throughGameServerExtractorbefore dispatchpreview-*filterTest plan
KubernetesMockServer(@EnableKubernetesMockClient(crud=true)) — add/update/delete flow, mode-based filtering, malformed event skip, multi-fleet, idempotent stopPlan: docs/plans/2026-04-25-plugin-platform-router.md (T7)