Skip to content

specify target kubeconfig url via spec#245

Merged
kcp-ci-bot merged 3 commits into
kcp-dev:mainfrom
SimonTheLeg:kubeconfig-target-workspace
Jun 23, 2026
Merged

specify target kubeconfig url via spec#245
kcp-ci-bot merged 3 commits into
kcp-dev:mainfrom
SimonTheLeg:kubeconfig-target-workspace

Conversation

@SimonTheLeg

@SimonTheLeg SimonTheLeg commented Jun 18, 2026

Copy link
Copy Markdown
Member

Summary

This PR adds a new top-level field to Kubeconfig object targetWorkspace and marks the current Authorization.clusterrolebindings.cluster as deprecated. I specifically chose to use a new field as A) the field now has overarching effect, not just for RBAC anymore B) to keep this from becoming a breaking change. Setting the new field also affects the server url of the generated kubeconfig object by appending the path to it. This allows you to create a kubeconfig targeted towards a specific workspace.

For now the behavior is designed as follows:

  • specifying both fields fails at apply time via CEL
  • specifying the old field will NOT change the URL so this is not a breaking change
  • specifying the new field will both change the URL and also ensure that the specified path will be used to apply RBAC (if RBAC is set)

Some implementation notices:

  • it also made sense to refactor our internal client parsing slightly, which I have chunked in a separate commit
  • To keep backward compatibility, the code is currently pretty large. Once we remove the deprecated field, it'll become a lot leaner

What Type of PR Is This?

/kind feature

Related Issue(s)

Fixes #94

Release Notes

Allow configuring target workspace path for kubeconfigs server url

On-behalf-of: SAP <simon.bein@sap.com>
Signed-off-by: Simon Bein <simontheleg@gmail.com>
On-behalf-of: SAP <simon.bein@sap.com>
Signed-off-by: Simon Bein <simontheleg@gmail.com>
@kcp-ci-bot kcp-ci-bot added kind/feature Categorizes issue or PR as related to a new feature. release-note Denotes a PR that will be considered when it comes time to generate release notes. dco-signoff: yes Indicates the PR's author has signed the DCO. labels Jun 18, 2026
This is required so we are not creating a breaking change

On-behalf-of: SAP <simon.bein@sap.com>
Signed-off-by: Simon Bein <simontheleg@gmail.com>
@kcp-ci-bot kcp-ci-bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jun 18, 2026
@SimonTheLeg SimonTheLeg changed the title refactor: use logicalcluster.Path in internal client parsing specify target kubeconfig url via spec Jun 18, 2026
@SimonTheLeg

Copy link
Copy Markdown
Member Author

/retest

@xrstf xrstf left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/approve

@kcp-ci-bot kcp-ci-bot added the lgtm Indicates that a PR is ready to be merged. label Jun 23, 2026
@kcp-ci-bot

Copy link
Copy Markdown
Contributor

LGTM label has been added.

DetailsGit tree hash: 15313d9abb10e874dab43f23616925355ca99db6

@kcp-ci-bot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: xrstf

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kcp-ci-bot kcp-ci-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 23, 2026
@kcp-ci-bot kcp-ci-bot merged commit 734a877 into kcp-dev:main Jun 23, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. dco-signoff: yes Indicates the PR's author has signed the DCO. kind/feature Categorizes issue or PR as related to a new feature. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feature: target a kcp workspace and custom endpoint with the 'kubeconfig' resource

3 participants