util

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	KindClusterIsReadyScript = `` /* 481-byte string literal not displayed */

	CreateKindClusterProxyScript = `` /* 324-byte string literal not displayed */

	OutputKKPUserClusterName = lib + `
export KUBECONFIG=$(mktemp)

clusterName="$(kind get clusters | head -n1)"
kind get kubeconfig --name "$clusterName" > $KUBECONFIG

while [ -z "$(get_cluster_namespace)" ]; do
  slee 1
done

kubectl get clusters --output jsonpath='{.items[].metadata.name}' 2>/dev/null
`

	OutputKKPUserClusterKubeconfig = lib + `
export KUBECONFIG=$(mktemp)

clusterName="$(kind get clusters | head -n1)"
kind get kubeconfig --name "$clusterName" > $KUBECONFIG

while [ -z "$(get_cluster_namespace)" ]; do
  slee 1
done

clusterNamespace="$(get_cluster_namespace)"

while [ -z "$(get_cluster_kubeconfig "$clusterNamespace")" ]; do
  slee 1
done

get_cluster_kubeconfig "$clusterNamespace"
`
)

Functions

func RunCommand

func RunCommand(ctx context.Context, clientset *kubernetes.Clientset, restConfig *rest.Config, pod *corev1.Pod, container string, command []string, stdin io.Reader) (string, error)

func RunCommandWithTTY

func RunCommandWithTTY(ctx context.Context, clientset *kubernetes.Clientset, restConfig *rest.Config, pod *corev1.Pod, container string, command []string, stdin io.Reader, stdout io.Writer, stderr io.Writer) error

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL