-
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
[POST-REBASE] remove hardcoded kubectl in apply warn msg #15194
[POST-REBASE] remove hardcoded kubectl in apply warn msg #15194
Conversation
@@ -314,7 +314,7 @@ func NewKubectlCommand(f cmdutil.Factory, in io.Reader, out, err io.Writer) *cob | |||
{ | |||
Message: "Advanced Commands:", | |||
Commands: []*cobra.Command{ | |||
NewCmdApply(f, out, err), | |||
NewCmdApply("kubectl", f, out, err), |
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.
Is there not a better source of truth for this?
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.
There doesn't seem to be one, in this file at least; closest thing would be to read the cobra command's Use
string, which just seems to have "kubectl" hardcoded in there as well.
Best thing would probably be to have NewKubectlCommand receive a new argument baseName string
and go from there.
Ultimate source of truth seems to lie here :)
Upstream pr has merged. @fabianofranz will just tag this one |
@juanvallejo PR needs rebase |
Origin Action Required: Pull request cannot be automatically merged, please rebase your branch from latest HEAD and push again |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: juanvallejo Assign the PR to them by writing No associated issue. Update pull-request body to add a reference to an issue, or get approval with The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: juanvallejo Assign the PR to them by writing No associated issue. Update pull-request body to add a reference to an issue, or get approval with The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: juanvallejo Assign the PR to them by writing No associated issue. Update pull-request body to add a reference to an issue, or get approval with The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
/assign fabianofranz |
Issues go stale after 90d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle stale |
Stale issues rot after 30d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle rotten |
message is configurable now:
|
When a resource is passed to apply and it was not created using apply (or
oc create
with the--save-config
flag), a warning message is printed:Warning: kubectl apply should be used on resource created by either kubectl create --save-config or kubectl apply
.This patch makes
kubectl
configurable in the warning message,cc @stevekuznetsov @openshift/cli-review