feat(workspaceobject): Add workspace object controller #123
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.
Summary
This PR introduces a new API,
WorkspaceObject, which enables managing any Kubernetes object within a workspace. The controller uses aRootShardreference and the workspace path to construct the appropriate kubeconfig. The API design is inspired by theObjectAPI from https://github.com/crossplane-contrib/provider-kubernetes and includes aspec.managementPoliciesfield to control which operations (create, update, delete) the controller should perform.The goal of this PR is to address #122. Instead of supporting only a single kind, we adopt a broader, more generic approach that supports any object type, including
Workspace,WorkspaceType, and RBAC configurations.This work aims to provide the following capabilities, enabling us to fully manage a KCP instance without relying on third-party operators that add additional complexity (e.g., Crossplane):
At present, the controller does not correctly handle system workspaces, which are shard-local. This may be improved in a future PR to allow administrators to define RBAC configurations in system workspaces for consistent, cluster-wide defaults (e.g., cluster-admin access via OIDC) without needing to apply them per workspace.
on-behalf-of: @eon-se opensource@eon.com
What Type of PR Is This?
/kind feature
Related Issue(s)
Fixes #122
Relates to #91 by providing a way to configure RBAC roles that can be used by generated kubeconfigs.
Release Notes