Repository navigation
feat(controller): add environments, groups and placement to the pool model - #45
Closed
TheMeinerLP wants to merge 4 commits into
Closed
TheMeinerLP wants to merge 4 commits into
TheMeinerLP wants to merge 4 commits into
Conversation
…esolution Environment and Group are new declarations next to Pool, each with a source (api, kubernetes, file). PoolSpec gains environment, groups, placement, sharding and private; the v1 driver field keeps working as placement.driver. ResolvePool merges pool, environment and groups into the spec a driver runs.
Adds a goose migration with environments and groups tables and a source column on pools. Pools stored before the migration are owned by the api.
…wned objects and count network players Pools can now name an environment and groups; instances start with the merged spec and drivers read it with a fallback to the v1 fields. A pool that names something unknown starts nothing and reports a pool.condition event once. The kubernetes source owns what it applies and the api gets ErrManagedElsewhere for those objects. The controller sums proxy players and publishes network.players on change.
Adds GET/PUT/DELETE for /v1/environments and /v1/groups under the pools scopes and GET /v1/network under players:read, which proxies already hold. Kubernetes-owned objects answer 409. openapi.yaml is regenerated.
Contributor
Author
|
Superseded by a rebased branch with a shorter commit header and regenerated web types. |
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.
Problem
A pool could only describe one way of running a server: inline image, command and driver. Operators who run the same server software in many pools had to repeat it everywhere, a pool could not say where it runs besides a single driver switch, and nothing marked who owns a declaration, so a later Kubernetes CRD source would have fought with the API over the same objects. Proxies also had no way to ask for the network-wide player count.
Approach
Testing
Table-driven tests for the merge rules and validation, store tests on temp SQLite files, controller tests with the fake driver and a fake clock (start with effective spec, unknown references, ownership guard, network events), driver tests for the effective-spec path, and API tests. go build, go vet, gofmt and go test ./... pass locally; openapi.yaml is regenerated and its sync test passes.