clihelper

package
v0.20.3 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2024 License: Apache-2.0 Imports: 37 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultPlatformNamespace = "vcluster-platform"
View Source
const LoftRouterDomainSecret = "loft-router-domain"

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

Functions

func DisplayName

func DisplayName(entityInfo *storagev1.EntityInfo) string

func EnsureAdminPassword

func EnsureAdminPassword(ctx context.Context, kubeClient kubernetes.Interface, restConfig *rest.Config, namespace, password string, log log.Logger) (bool, error)

Makes sure that admin user and password secret exists Returns (true, nil) if everything is correct but password is different from parameter `password`

func EnsureIngressController

func EnsureIngressController(ctx context.Context, kubeClient kubernetes.Interface, kubeContext string, log log.Logger) error

func EnterHostNameQuestion

func EnterHostNameQuestion(log log.Logger) (string, error)

func GetDisplayName

func GetDisplayName(name string, displayName string) string

func GetLoftDefaultPassword

func GetLoftDefaultPassword(ctx context.Context, kubeClient kubernetes.Interface, namespace string) (string, error)

func GetLoftIngressHost

func GetLoftIngressHost(ctx context.Context, kubeClient kubernetes.Interface, namespace string) (string, error)

func GetLoftManifests

func GetLoftManifests(chartName, chartRepo, kubeContext, namespace string, extraArgs []string, _ log.Logger) (string, error)

func GetProKubeConfig

func GetProKubeConfig(options kubeconfig.ContextOptions) (*clientcmdapi.Config, error)

GetProKubeConfig builds a pro kube config from options and client

func GetTableDisplayName

func GetTableDisplayName(name string, displayName string) string

func IsLocalCluster

func IsLocalCluster(host string, log log.Logger) bool

func IsLoftAlreadyInstalled

func IsLoftAlreadyInstalled(ctx context.Context, kubeClient kubernetes.Interface, namespace string) (bool, error)

func IsLoftInstalledLocally

func IsLoftInstalledLocally(ctx context.Context, kubeClient kubernetes.Interface, namespace string) bool

func IsLoftReachable

func IsLoftReachable(ctx context.Context, host string) (bool, error)

func IsPrivateIP

func IsPrivateIP(ip net.IP) bool

IsPrivateIP checks if a given ip is private

func StartPortForwarding

func StartPortForwarding(ctx context.Context, config *rest.Config, client kubernetes.Interface, pod *corev1.Pod, localPort string, log log.Logger) (chan struct{}, error)

func Timeout

func Timeout() time.Duration

func UninstallLoft

func UninstallLoft(ctx context.Context, kubeClient kubernetes.Interface, restConfig *rest.Config, kubeContext, namespace string, log log.Logger) error

func UpgradeLoft

func UpgradeLoft(chartName, chartRepo, kubeContext, namespace string, extraArgs []string, log log.Logger) error

func VClusterPlatformInstallationNamespace added in v0.20.1

func VClusterPlatformInstallationNamespace(ctx context.Context) (string, error)

func WaitForReadyLoftPod

func WaitForReadyLoftPod(ctx context.Context, kubeClient kubernetes.Interface, namespace string, log log.Logger) (*corev1.Pod, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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