forked from openshift/origin
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
openshift-diagnostics: package as oc alias
Makes `openshift-diagnostics` a symlink to `oc` (like `kubectl`) so that it can be packaged inside origin pods to be run from diagnostics. fixes openshift#18141
- Loading branch information
Showing
5 changed files
with
31 additions
and
47 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package diagnostics | ||
|
||
import ( | ||
"io" | ||
|
||
"github.com/spf13/cobra" | ||
) | ||
|
||
const ( | ||
DiagnosticsInPodRecommendedName = "openshift-diagnostics" | ||
) | ||
|
||
// NewCmdDiagnosticsInPod defines the base command that is used inside of a pod | ||
// orchestrated by a regular diagnostic, to report from the in-pod vantage point. | ||
func NewCmdDiagnosticsInPod(name string, fullName string, out io.Writer) *cobra.Command { | ||
cmd := &cobra.Command{ | ||
Use: name, | ||
Short: "Diagnose OpenShift from inside a pod", | ||
} | ||
cmd.AddCommand( | ||
NewCommandPodDiagnostics("diagnostic-pod", out), | ||
NewCommandNetworkPodDiagnostics("network-diagnostic-pod", out), | ||
) | ||
|
||
return cmd | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters