-
Notifications
You must be signed in to change notification settings - Fork 266
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add --context
flag to choose specific context from kubeconfig
#1234
feat: Add --context
flag to choose specific context from kubeconfig
#1234
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dsimansk: 0 warnings.
In response to this:
Description
I've noticed new comments on the issue and though it should be pretty straightforward and great addition to
kn
. Most of the changes are docs (in separate commit).Changes
- Add
--context
flag to choose specific context from kubeconfig- Changelog entry
TBD
Reference
Fixes #925
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
Let try to get this in for 0.21, too. |
@@ -183,8 +188,8 @@ func (params *KnParams) GetClientConfig() (clientcmd.ClientConfig, error) { | |||
|
|||
paths := filepath.SplitList(params.KubeCfgPath) | |||
if len(paths) > 1 { | |||
return nil, fmt.Errorf("Can not find config file. '%s' looks like a path. "+ | |||
return nil, fmt.Errorf("can not find config file. '%s' looks like a path. "+ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Error messages are changed due to lint warning "Error string should not be capitalized or end with punctuation".
/retest
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
/assign @rhuss
/hold
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, I wonder whether we should also add --cluster
like for kubectl in one go ?
Or should this be better done in a separate PR ?
Co-authored-by: Roland Huß <rhuss@redhat.com>
Well, probably makes sense to add it together. I'll take a look right now. |
@@ -17,9 +17,14 @@ | |||
|=== | |||
| | Description | PR | |||
|
|||
| 🎁 | |||
| Add `--context` and `--cluster` flags to choose specific context from kubeconfig |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I couldn't decide if that shouldn't be split to 2 entries per flag. Please let me know wdyt.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is fine
The following is the coverage report on the affected files.
|
Infra issue |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks !
/lgtm
/unhold
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: navidshaikh, rhuss The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Description
I've noticed new comments on the issue and though it should be pretty straightforward and great addition to
kn
. Most of the changes are docs (in separate commit).Changes
--context
flag to choose specific context from kubeconfigReference
Fixes #925