Repository navigation
feat(tenants-test): configure --tenants and the tenant reconciler proof - #741
Merged
Merged
Conversation
platform.tenants (configure --tenants) renders the chart's tenants.organizations.enabled and, until giantswarm/agent-platform#1041, Substrate credential policies for tenants-test's two namespaces. tenants-test [email email] proves agent-manager's tenant reconciler over two organization namespaces through agent-manager's REST API as each person: the always-kept objects, the other organization's create refused, the first agent's copies, the worker admitted and a turn on the namespace's own credentials, the workers held against a cluster-admin, the network policy copies and the credential grants by label where the lab has them, the copies gone with the last agent. Refs #739
…g chart pieces The tenant WorkerPool must carry agent-manager's --tenant-worker-pool-replicas. A lab whose chart does not wire the switch, or lacks agent-platform:editor, is told so; the hint names kubectl logs. HACKS.md U33 records the hand-listed credential policy.
…as the rest of the code
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.
Closes #739
Problem
The slice 3 proof of agent-manager's tenant reconciler (giantswarm/agent-manager#71) and of
tenants.organizations.enabledwas done by hand on 2026-10-15. Nothing could run it again after a change to agent-manager, the chart or Substrate.Change
agentlab configure --tenants[=false]andplatform.tenants.enabledinagentlab.yaml(needsplatform.agents). The values rendertenants.organizations.enabled: true. Until Inject credentials for agents in organization namespaces (credential provider policies by label) agent-platform#1041, they also rendersubstrate.credentialProvider.namespacePolicies: the chart's two entries, plus the twotenants-testnamespaces (each read by its own atespace and byate-golden). Today's chart needs these entries; without them a turn in an organization namespace cannot read its model key. HACKS.md U33 records the removal.agentlab tenants-test [email email]: two namespacesorg-agentlab-tenants-aand-b, labelledgiantswarm.io/organization, one person bound toagent-platform:editorin each (default: the first two users outsideplatform-admins). It calls agent-manager's REST API (port-forward to the pod) as each person with their Dex token (audienceskubernetesandagent-platform). Steps 1 to 6 of proofs: tenants-test — the tenant reconciler over two organization namespaces #739. Step 5 skips the network-policy check when agent-manager copies no network policies, and the grants check when the credential policy has noownNamespaceSelectorentry; each skip prints its reason. Step 6 asserts only the end state (Tenant reconciler: deleting a tenant's last agent deletes the tenant's OCIRepository agent-manager#175). The run removes its namespaces at the start, at the end and after a failure.agent-platform:editor, or a credential policy without the two namespaces fails before any write, with the fix.docs/agents.md"Organizations as tenants",docs/cli.md,CLAUDE.md.Tests
go test ./...: pass, exceptTestMeasureBuildNotAvailableandTestMeasureBuildDownloadsDependencieson macOS (BSDdate +%N, not changed here).golangci-lintand pre-commit: pass.Review
spec.replicasmust equal--tenant-worker-pool-replicas; ready and Running counts equalkubectl logs deploy/agent-manageragent-platform:editorchecked before any write--multi-tenantreads as on