No description
  • Go 89.4%
  • Go Template 4.2%
  • Makefile 3%
  • Shell 2.2%
  • Nix 1.2%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
sa-renovate 8e1cd347c4
All checks were successful
ci-main / test (pull_request) Successful in 7m36s
ci-integration / test-integration (push) Successful in 4m12s
ci-main / test (push) Successful in 6m46s
fix(deps): update module github.com/testcontainers/testcontainers-go to v0.44.0
2026-08-17 08:48:34 +00:00
.forgejo/workflows chore(deps): pin dependencies 2026-07-30 15:25:20 +00:00
api/v1alpha1 chore(api): regenerate deepcopy 2026-07-31 18:14:30 +02:00
cmd/workspace-controller feat(quota): add ADR-0026 §4b trueup for the child-workspace count 2026-08-12 13:45:06 +02:00
config chore: regenerate APIResourceSchemas with s-prefixed names 2026-06-03 11:02:42 +02:00
deploy/charts docs(quota): name the real quotaenforcements APIExport in the trueup setup 2026-08-12 13:45:35 +02:00
docs docs: add license, contribution, governance and security policy 2026-07-30 15:04:06 +02:00
hack fix: prefix schema hash with 's' to keep valid DNS label 2026-06-03 11:00:44 +02:00
internal test(quota): pin the counted kind to the shared enforcer registry 2026-08-12 13:45:35 +02:00
.envrc feat: bootstrap multi-cluster Workspace controller 2026-05-26 11:50:41 +02:00
.gitignore refactor: map permissionClaims via toYaml in apiexport template 2026-06-02 14:09:38 +02:00
.golangci.yml feat: adopt controller-util shared helpers + wire golangci-lint v2 2026-05-27 09:31:56 +02:00
.goreleaser.yaml chore: renamed project to workspace-controller 2026-05-27 10:44:47 +02:00
AGENTS.md feat: added AGENTS.md and CLAUDE.md 2026-05-29 10:39:45 +02:00
CLAUDE.md feat: added AGENTS.md and CLAUDE.md 2026-05-29 10:39:45 +02:00
CONTRIBUTING.md docs: add license, contribution, governance and security policy 2026-07-30 15:04:06 +02:00
Dockerfile.workspace.goreleaser chore: renamed project to workspace-controller 2026-05-27 10:44:47 +02:00
flake.lock test: normalize projected auth contract 2026-07-23 15:59:05 +02:00
flake.nix feat: bootstrap multi-cluster Workspace controller 2026-05-26 11:50:41 +02:00
go.mod fix(deps): update module github.com/testcontainers/testcontainers-go to v0.44.0 2026-08-17 08:48:34 +00:00
go.sum fix(deps): update module github.com/testcontainers/testcontainers-go to v0.44.0 2026-08-17 08:48:34 +00:00
GOVERNANCE.md docs: add license, contribution, governance and security policy 2026-07-30 15:04:06 +02:00
LICENSE docs: add license, contribution, governance and security policy 2026-07-30 15:04:06 +02:00
Makefile feat: add projected KCP authentication 2026-07-22 17:05:55 +02:00
README.md feat(quota): add ADR-0026 §4b trueup for the child-workspace count 2026-08-12 13:45:06 +02:00
renovate.json Update renovate.json 2026-07-28 13:31:39 +00:00
SECURITY.md docs: add license, contribution, governance and security policy 2026-07-30 15:04:06 +02:00

workspace-controller

CI Integration Release Go License

IPCEI-CIS Badge

workspace-controller is part of the IPCEI-CIS cloud infrastructure initiative. Within the IPCEI-CIS edge framework it provides the multi-tenant workspace provisioning layer of the edge-connect platform.

kcp controller that owns the Workspace resource (per ADR-0020). A Workspace authored inside an org workspace (root:orgs:{org}) is reconciled into a kcp nested workspace at root:orgs:{org}:{name}, with:

  • the three controller-managed ClusterRoles (workspace-owner / workspace-editor / workspace-viewer) seeded inside it,
  • ClusterRoleBindings for every entry in spec.owners (the unified OwnerBinding{Kind, Name} shape from ADR-0021),
  • an APIBinding per configured customer-facing APIExport.

The controller is multi-cluster: a single binary watches Workspace CRs across every org workspace via an APIExport's virtual-workspace endpoint, using kcp-dev/multicluster-provider + multicluster-runtime.

Layout

.
├── api/v1alpha1/                  # CRD source of truth (kubebuilder annotations)
│   ├── groupversion_info.go
│   ├── ownerbinding_types.go      # canonical OwnerBinding{Kind, Name}
│   ├── workspace_types.go         # Workspace, WorkspaceSpec, WorkspaceStatus
│   └── zz_generated.deepcopy.go   # generated by `make generate`
├── cmd/
│   └── workspace-controller/      # main binary
├── internal/
│   ├── controller/
│   │   ├── quota/                 # ADR-0026 §4b trueup: Workspace count -> QuotaEnforcement
│   │   ├── util/                  # shared helpers (conditions)
│   │   ├── workspace/             # the Workspace reconciler
│   │   └── testutil/              # test fixtures + fake mcmanager
│   └── kcpws/                     # kcp-facing client (workspace + RBAC + APIBindings)
├── config/
│   ├── crd/                       # generated by `make manifests`
│   └── kcp/                       # generated by `make schemas`
├── deploy/charts/
│   ├── workspace-controller/      # deployment chart for the binary
│   └── workspace-controller-kcp/  # APIExport + APIResourceSchema + RBAC
├── Dockerfile.workspace.goreleaser
├── .goreleaser.yaml
├── Makefile
└── go.mod

Generating CRDs and APIResourceSchemas

make all                # generate + manifests + schemas
make generate           # zz_generated.deepcopy.go
make manifests          # CRD YAML in config/crd/
make schemas            # APIResourceSchema YAML in config/kcp/
make build              # build the controller binary to bin/
make vet
make test
make helm-lint

Running the controller

KCP_KUBECONFIG=/path/to/kcp.kubeconfig \
go run ./cmd/workspace-controller \
  --endpointslice=workspaces \
  --apibinding=workspaces:root:controllers:workspace-controller \
  --owner-cluster-role-name=workspace-owner

--apibinding may be repeated. Each value is name:exportPath (or name:exportPath:exportName when the binding name differs from the export name) and produces one APIBinding inside every provisioned workspace. The APIBindingsReady condition flips True once all of them report Bound / Ready. Pass none to skip the binding step entirely; the condition then trivially reports True.

Quota trueup

With --quota-trueup, the binary also runs the ADR-0026 §4b trueup for the child-workspace count: internal/controller/quota counts Workspace CRs from the multicluster cache the controller already maintains, and the shared pkg/trueup reconciler writes that count into QuotaEnforcement.status.usage for directives addressed to the workspace-controller enforcer. This is what reclaims quota slots after an out-of-band delete, and reservations that were admitted but never persisted.

The flag needs the APIExport to claim tenancy.edgeconnect.eu/quotaenforcements — see quotaEnforcements.enabled in the workspace-controller-kcp chart.

License

Apache-2.0 — see LICENSE.

Funding and Support

This open source project is part of activities carried out within the Important Project of Common European Interest on Next Generation Cloud Infrastructure and Services (IPCEI-CIS) — FKZ 13IPC005, an EU initiative to build a sovereign, interoperable and energy-efficient cloud-to-edge infrastructure in Europe.

The work in this repository has been supported and co-funded by Deutsche Telekom in the context of IPCEI-CIS, where Deutsche Telekom contributes its expertise in secure, sustainable connectivity and cloud-edge platform orchestration for a European cloud-edge continuum.

Where applicable, further national or European public funding instruments associated with IPCEI-CIS may also have contributed to the development of this software.

IPCEI-CIS