clihelper

package
v0.22.0-alpha.2 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const MinHelmVersion = "v3.10.0"

Variables

View Source
var CriticalStatus = map[string]bool{
	"Error":                      true,
	"Unknown":                    true,
	"ImagePullBackOff":           true,
	"CrashLoopBackOff":           true,
	"RunContainerError":          true,
	"ErrImagePull":               true,
	"CreateContainerConfigError": true,
	"InvalidImageName":           true,
}

CriticalStatus container status

View Source
var SortPodsByNewest = func(pods []corev1.Pod, i, j int) bool {
	return pods[i].CreationTimestamp.Unix() > pods[j].CreationTimestamp.Unix()
}

Functions

func CheckHelmVersion

func CheckHelmVersion(output string) error

func GetKubeConfig

func GetKubeConfig(ctx context.Context, kubeClient *kubernetes.Clientset, vclusterName string, namespace string, log log.Logger) (*clientcmdapi.Config, error)

GetKubeConfig attempts to read the kubeconfig from the default Secret and falls back to reading from filesystem if the Secret is not read successfully. Reading from filesystem is implemented for the backward compatibility and can be eventually removed in the future.

This is retried until the kube config is successfully retrieve, or until 10 minute timeout is reached.

func HasPodProblem

func HasPodProblem(pod *corev1.Pod) bool

func RandomPort

func RandomPort() int

func UpdateKubeConfig

func UpdateKubeConfig(contextName string, cluster *clientcmdapi.Cluster, authInfo *clientcmdapi.AuthInfo, setActive bool) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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