Skip to content

cli/pkg/base/options.go: don't disable any CLI options - #4313

Open
neolit123 wants to merge 1 commit into
kcp-dev:mainfrom
neolit123:4312-enable-context-auth-and-timeout-options
Open

cli/pkg/base/options.go: don't disable any CLI options#4313
neolit123 wants to merge 1 commit into
kcp-dev:mainfrom
neolit123:4312-enable-context-auth-and-timeout-options

Conversation

@neolit123

@neolit123 neolit123 commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Summary

This allows passing the additional flags:

--as
--as-group
--client-certificate
--client-key
--cluster
--request-timeout

The only conflating one might be --cluster in the context of kcp, but there is already a --workspace flag.

e.g.

k ws tree --as alice

What Type of PR Is This?

/kind feature

Related Issue(s)

Fixes #4312

Release Notes

Enable the following flags for all CLI commands similarly to how kubectl supports them: --as, --as-group, --client-certificate, --client-key, --cluster, --request-timeout.

@kcp-ci-bot kcp-ci-bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/feature Categorizes issue or PR as related to a new feature. dco-signoff: yes Indicates the PR's author has signed the DCO. labels Aug 4, 2026
This allows passing the additional flags:

--as
--as-group
--client-certificate
--client-key
--cluster
--request-timeout

The only conflating one might be --cluster in the context
of kcp, but there is already a --workspace flag.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
@kcp-ci-bot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign embik for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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 size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Aug 4, 2026
@neolit123
neolit123 force-pushed the 4312-enable-context-auth-and-timeout-options branch from b684d60 to d15342c Compare August 4, 2026 16:50
@neolit123
neolit123 requested a lite review from Copilot August 4, 2026 16:50

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Enables the full set of clientcmd.RecommendedConfigOverrideFlags that were previously being selectively disabled in cli/pkg/base/options.go, allowing CLI users to pass kubectl-style auth/context flags (notably impersonation and client cert/key) across commands.

Changes:

  • Removes the logic that blanked LongName on several recommended kubeconfig override flags, re-enabling them in flag binding.
  • As a result, the following flags become available where base.Options.BindFlags is used: --as, --as-group, --client-certificate, --client-key, --cluster, --request-timeout.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dco-signoff: yes Indicates the PR's author has signed the DCO. 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. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feature: allow CLI users to pass auth flags like --as and --as-group

3 participants