-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Expose api-versions and api-resources in oc #19884
Expose api-versions and api-resources in oc #19884
Conversation
pkg/oc/cli/cmd/wrappers.go
Outdated
|
||
func NewCmdApiVersions(fullName string, f *clientcmd.Factory, out io.Writer) *cobra.Command { | ||
cmd := kcmd.NewCmdApiVersions(f, out) | ||
cmd.Example = fmt.Sprintf(apiresourcesExample, fullName) |
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.
why bother replacing the example?
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.
Because the kube version uses kubectl in examples.
pkg/oc/cli/cmd/wrappers.go
Outdated
|
||
func NewCmdApiVersions(fullName string, f *clientcmd.Factory, out io.Writer) *cobra.Command { | ||
cmd := kcmd.NewCmdApiVersions(f, out) | ||
cmd.Example = fmt.Sprintf(apiresourcesExample, fullName) |
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.
why does apiversions have an apiresources example?
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.
My bad.
is this api-resources in it's current state or the state after the first pull? I suspect we'll want the current state. You could do it as two drops on top of this: one drop for copy/paste of current state. a second drop for fitting to the old factory if any. |
@deads2k the picks were very easy so I just went with UPSTREAM commits. |
@soltysh @mfojtik we should have a card to make a better way to handle the binary name substitution in kubectl help. Perhaps we can simply write a dumb find/replace on the command tree. You should have a test-cmd test that demonstrates this working on openshift resources. lgtm otherwise. feel free to tag after test. |
In majority of commands we pass |
Test added, tagging. |
[APPROVALNOTIFIER] This PR is APPROVED Approval requirements bypassed by manually added approval. This pull-request has been approved by: soltysh 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 |
/retest Please review the full test history for this PR and help us cut down flakes. |
/assign @deads2k