util

package
Version: v1.2.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 12, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package util contains top-level utility commands which are neither storage backends nor associated with a particular storage backend.

Index

Constants

This section is empty.

Variables

View Source
var CmdReporterCmd = &cobra.Command{
	Use:   "cmd-reporter",
	Short: "Run a given command to completion, and store the result in a ConfigMap.",
	Long: `Run a given command to completion, and store the Stdout, Stderr, and return code
results of the command in a ConfigMap. If the ConfigMap already exists, the
Stdout, Stderr, and return code data which may be present in the ConfigMap
will be overwritten.

If cmd-reporter succeeds in running the command to completion, no error is
reported, even if the command's return code is nonzero (failure). Run will
terminate if the command could not be run for any reason or if there was an
error storing the command results into the ConfigMap. An application label
is applied to the ConfigMap. Run will also terminate if the label already
exists and has a different application's name name; this may indicate that
it is not safe for cmd-reporter to edit the ConfigMap.`,
	Args: cobra.NoArgs,
	Run:  runCmdReporter,
}

CmdReporterCmd defines a top-level utility command which runs a given command and stores the results in a ConfigMap. Operators are advised to use operator/k8sutil.CmdReporter, which wraps this functionality neatly rather than calling this with a custom setup.

View Source
var CopyBinsCmd = &cobra.Command{
	Use:   "copy-binaries",
	Short: "Copy 'rook' and 'tini' binaries from a container to a given directory.",
	Long: `Copy 'rook' and 'tini' binaries from a container to a given directory.
As an example, 'cmd-reporter run' may often need to be run from a container
other than the container containing the 'rook' binary. Use this command to copy
the 'rook' and required 'tini' binaries from the container containing the 'rook'
binary to a Kubernetes EmptyDir volume mounted at the given directory in a pod's
init container. From the pod's main container, mount the volume which now
contains the 'rook' and 'tini' binaries, and call 'rook cmd-reporter run' from
'tini' in order to run the desired command from a non-Rook container.`,
	Args: cobra.NoArgs,
	RunE: runCopyBins,
}

CopyBinsCmd defines a top-level utility command which copies rook and tini binaries from the Rook container image to a directory.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL