istio: Index | Files

package kubectlcmd

import ""


Package Files


func Cat Uses

func Cat(client kube.ExtendedClient, namespace, pod, container, path string, dryRun bool) (string, error)

Cat runs the cat command for the given path in the given namespace/pod/container.

func EnvoyGet Uses

func EnvoyGet(client kube.ExtendedClient, namespace, pod, url string, dryRun bool) (string, error)

EnvoyGet sends a GET request for the URL in the Envoy container in the given namespace/pod and returns the result.

func Exec Uses

func Exec(client kube.ExtendedClient, namespace, pod, container, cmdStr string, dryRun bool) (string, error)

Exec runs exec for the given command in the given namespace/pod/container.

func Logs Uses

func Logs(client kube.ExtendedClient, namespace, pod, container string, previous, dryRun bool) (string, error)

Logs returns the logs for the given namespace/pod/container.

func Run Uses

func Run(subcmds []string, opts *Options) (string, error)

Run runs the kubectl command by specifying subcommands in subcmds with opts.

func RunCmd Uses

func RunCmd(command, namespace string, dryRun bool) (string, error)

RunCmd runs the given command in kubectl, adding -n namespace if namespace is not empty.

type Options Uses

type Options struct {
    // Path to the kubeconfig file.
    Kubeconfig string
    // ComponentName of the kubeconfig context to use.
    Context string

    // namespace - k8s namespace for Run command
    Namespace string

    // DryRun performs all steps but only logs the Run command without running it.
    DryRun bool
    // Maximum amount of time to wait for resources to be ready after install when Wait=true.
    WaitTimeout time.Duration

    // output - output mode for Run i.e. --output.
    Output string

    // extraArgs - more args to be added to the Run command, which are appended to
    // the end of the Run command.
    ExtraArgs []string

Options contains the Run options.

Package kubectlcmd imports 12 packages (graph) and is imported by 2 packages. Updated 2020-10-15. Refresh now. Tools for package owners.