Atespace: per-tenant scoping for the actor lifecycle#280
Open
Haven Xia (HavenXia) wants to merge 6 commits into
Open
Atespace: per-tenant scoping for the actor lifecycle#280Haven Xia (HavenXia) wants to merge 6 commits into
Haven Xia (HavenXia) wants to merge 6 commits into
Conversation
e9eddfb to
1728f96
Compare
838b199 to
26d0074
Compare
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.
This is part of solution for #21.
First incremental slice of the atespace design for actors — part of #21. An atespace is a mandatory tenant boundary that every actor belongs to. It's folded into the actor's identity and storage key (
actor:<atespace>:<id>), so list/get/delete within a tenant is a cheap key-prefix operation, and actors in different atespaces can reuse the same id without colliding.This PR adds atespace through the actor lifecycle end-to-end (proto → store → control API →
kubectl-ate).It doesn't touch DNS, snapshots, scheduling, or auth. Landing it on its own so the future changes are additive, and everything that isn't actor-CRUD is explicitly out of scope below.
This PR changes:
keyed actor:<atespace>:<id>-GetActor/DeleteActor/ListActorstake an atespace. Listing is a scoped SCANactor:<atespace>:*, or SCANactor:*for all atespaces.DNS-1123label. The syncer's dead-worker recovery is atespace-aware by addingWorker.actor_atespace.kubectl-ate:--atespace/-aon every actor subcommand (create/get/delete/resume/suspend/pause/logs).-A/--all-atespacesto list across all tenants.ATESPACEcolumn in the actor table, the existing namespace column is renamedTEMPLATE NSto disambiguate it from the atespace.Examples
Scope a listing to one tenant (-a is shorthand for --atespace):
Creation
Get by atespaces
Resume & Suspend
Scope / non-goals
Deferred to later atespace increments (intentionally not in this PR): the Atespace object + CRUD
RPCs, DNS names, snapshot paths, template grants, the worker's own (system) atespace, and quota.