Documentation ¶
Index ¶
- Variables
- func CheckHelmVersion(output string) error
- func GetKubeConfig(ctx context.Context, kubeClient *kubernetes.Clientset, vclusterName string, ...) (*clientcmdapi.Config, error)
- func GetProKubeConfig(options loftkubeconfig.ContextOptions) (*clientcmdapi.Config, error)
- func HasPodProblem(pod *corev1.Pod) bool
- func RandomPort() int
- func UpdateKubeConfig(contextName string, cluster *clientcmdapi.Cluster, ...) error
Constants ¶
This section is empty.
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 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 GetProKubeConfig ¶
func GetProKubeConfig(options loftkubeconfig.ContextOptions) (*clientcmdapi.Config, error)
GetProKubeConfig builds a pro kube config from options and client
func HasPodProblem ¶
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.
Click to show internal directories.
Click to hide internal directories.