clihelper

package
v4.0.0-alpha.3 Latest Latest
Warning

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

Go to latest
Published: May 10, 2024 License: MPL-2.0 Imports: 36 Imported by: 0

Documentation

Index

Constants

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 *clusterv1.EntityInfo) string

func EnsureAdminPassword

func EnsureAdminPassword(ctx context.Context, kubeClient kubernetes.Interface, restConfig *rest.Config, 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 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 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 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