No description
  • Go 83.9%
  • Shell 13.7%
  • Makefile 1.9%
  • Dockerfile 0.5%
Find a file
Manuel Ganter 2944dce27e
Some checks failed
ci-integration / test-integration (push) Successful in 1m19s
ci-main / test (push) Failing after 2m4s
ci / goreleaser (push) Successful in 8m35s
feat: resolve apiexport VW URL from APIExportEndpointSlice
The server required a static --filtered-apiexport-virtual-workspace-kubeconfig
whose server URL embedded the apiexport's logical-cluster id
(/services/apiexport/<cluster-id>/sync.edge-connect.eu). That id is only known
after the provider workspace exists, forcing a hand-filled kubeconfig.

Resolve the apiexport virtual-workspace URL at runtime from the kcp
APIExportEndpointSlice status instead. Replace the kubeconfig flag with
--filtered-apiexport-endpointslice-path / --filtered-apiexport-endpointslice-name;
reuse the front-proxy credentials and override only the Host. A single
front-proxy kubeconfig is now sufficient.

Add a sample APIExportEndpointSlice manifest and update the deployment docs.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-18 11:44:18 +02:00
.forgejo/workflows refactor: rename binary filtered-apiexport-vw to filtered-apiexport-virtual-workspace 2026-06-17 18:03:20 +02:00
cmd/filtered-apiexport-virtual-workspace feat: resolve apiexport VW URL from APIExportEndpointSlice 2026-06-18 11:44:18 +02:00
deploy feat: resolve apiexport VW URL from APIExportEndpointSlice 2026-06-18 11:44:18 +02:00
docs feat: resolve apiexport VW URL from APIExportEndpointSlice 2026-06-18 11:44:18 +02:00
hack refactor: rename binary filtered-apiexport-vw to filtered-apiexport-virtual-workspace 2026-06-17 18:03:20 +02:00
internal feat: resolve apiexport VW URL from APIExportEndpointSlice 2026-06-18 11:44:18 +02:00
sdk refactor: rename binary filtered-apiexport-vw to filtered-apiexport-virtual-workspace 2026-06-17 18:03:20 +02:00
.gimps.yaml Initial commit 2026-01-30 17:33:09 +01:00
.gitignore Implement controllers and initial multi-shard support 2026-02-08 12:36:29 +01:00
.golangci.yml refactor: rename binary filtered-apiexport-vw to filtered-apiexport-virtual-workspace 2026-06-17 18:03:20 +02:00
.goreleaser.yaml refactor: rename binary filtered-apiexport-vw to filtered-apiexport-virtual-workspace 2026-06-17 18:03:20 +02:00
.wwhrd.yml Initial commit 2026-01-30 17:33:09 +01:00
CODE_OF_CONDUCT.md Initial commit 2026-01-30 17:33:09 +01:00
CONTRIBUTING.md Initial commit 2026-01-30 17:33:09 +01:00
DCO Initial commit 2026-01-30 17:33:09 +01:00
Dockerfile fix(deps): bump Go toolchain to 1.25.11 for stdlib CVE fixes 2026-06-17 19:12:13 +02:00
Dockerfile.filtered-apiexport-virtual-workspace.goreleaser refactor: rename binary filtered-apiexport-vw to filtered-apiexport-virtual-workspace 2026-06-17 18:03:20 +02:00
go.mod fix(deps): bump Go toolchain to 1.25.11 for stdlib CVE fixes 2026-06-17 19:12:13 +02:00
go.sum fix(deps): bump kcp to v0.31.1 and resolve CVEs 2026-06-17 18:36:50 +02:00
GOVERNANCE.md Initial commit 2026-01-30 17:33:09 +01:00
LICENSE Initial commit 2026-01-30 17:33:09 +01:00
Makefile refactor: rename binary filtered-apiexport-vw to filtered-apiexport-virtual-workspace 2026-06-17 18:03:20 +02:00
OWNERS Initial commit 2026-01-30 17:33:09 +01:00
README.md refactor: rename binary filtered-apiexport-vw to filtered-apiexport-virtual-workspace 2026-06-17 18:03:20 +02:00
renovate.json Add renovate.json 2026-06-18 03:08:26 +00:00

OnHold

This repository served as an exploration into routing objects between providers using a VirtualWorkspace architecture. Following initial implementation and testing, it was determined that the current design is not viable for real-world production scenarios.

Core Technical Limitations

The primary challenge lies in the lack of alignment with Kubernetes Resource Model (KRM) semantics during provider transitions. Specifically:

State Discontinuity: When a user modifies a label or routing configuration, the object is immediately removed from the source provider and recreated in the destination provider.

Protocol Incompatibility: These transitions do not natively support standard KRM operations such as WATCH or DELETE. Consequently, controllers or automated systems monitoring these objects lose track of the state during the migration.

Lack of Persistence: To resolve these issues, the system would require the generation of synthetic events and the management of "shadow" objects (to handle finalizers and graceful deletions). This would necessitate a dedicated persistence layer within the workspace, which falls outside the original scope of this lightweight routing experiment.

Future Exploration

While this project is no longer being actively maintained or updated, the underlying concepts remain open for discussion. If you are interested in evolving these ideas or addressing the persistence requirements mentioned above, please reach out to the maintainers.

Filtered APIExport Virtual Workspace

Go Report Card GitHub

The Filtered APIExport Virtual Workspace is an external virtual workspace for kcp that gives Service Providers (APIExport owners) filtered access to their resources in consumer workspaces (bound via APIBindings). This workspace is an extension of the built-in APIExport Virtual Workspace, scoped only to objects that match the provided label selector.

Overview

When a Service Provider exposes an API via an APIExport, they can use the built-in APIExport Virtual Workspace to access all resources across consumer workspaces that have bound the API. The Filtered APIExport Virtual Workspace extends this by allowing:

  • Label-based Filtering: Access only objects matching a specific label selector through a dedicated virtual workspace URL
  • Multiple Views: Create different filtered endpoints for different use cases (e.g., by environment, team, or region)
  • Dynamic Scoping: Objects are filtered at request time based on the configured selector

How It Works

  1. A Service Provider creates a FilteredAPIExportEndpointSlice resource that references their APIExport and defines a label selector
  2. The controller validates the APIExport reference and generates virtual workspace endpoint URLs in the status
  3. The Service Provider uses the endpoint URL to access resources across all consumer workspaces
  4. Only objects matching the label selector are visible through this endpoint

Custom Resource Definition

FilteredAPIExportEndpointSlice

The FilteredAPIExportEndpointSlice resource registers endpoints in the Filtered APIExport Virtual Workspace:

apiVersion: sync.edge-connect.eu/v1alpha1
kind: FilteredAPIExportEndpointSlice
metadata:
  name: example
spec:
  export:
    # Path to the workspace containing the APIExport
    path: root:my-org
    # Name of the APIExport
    name: my-apiexport
  objectSelector:
    # Only objects matching this selector will be visible
    matchLabels:
      environment: "prod"
      team: "platform"

Deployment

See the Deployment document for more details.

Quick Start

See the Quick Start document for more details.

Development

Building

# Build all binaries
make build

# Run code generation
make codegen

Testing

# Run unit tests
make test

# Run integration tests (boots a real kcp via testcontainers; needs a Docker/OrbStack daemon)
make test-integration

The integration test boots kcp in a container, installs the sync.edge-connect.eu CRD, wires the real reconciler, and asserts the APIExportValid condition tracks the referenced APIExport. Override the kcp image with KCP_IMAGE, or point at an existing cluster with KCP_KUBECONFIG.

Troubleshooting

If you encounter problems, please file an issue.

Contributing

Thanks for taking the time to start contributing!

Before you start

  • Please familiarize yourself with the Code of Conduct before contributing.
  • See CONTRIBUTING.md for instructions on the developer certificate of origin that we require.

Pull requests

  • We welcome pull requests. Feel free to dig through the issues and jump in.

Changelog

See the list of releases to find out about feature changes.

License

Apache 2.0