localkubernetes

package
v0.30.0 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2023 License: MPL-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CleanupBackgroundProxy

func CleanupBackgroundProxy(proxyName string, log log.Logger) error

func CreateBackgroundProxyContainer

func CreateBackgroundProxyContainer(vClusterName, vClusterNamespace string, rawConfig, vRawConfig *clientcmdapi.Config, localPort int, log log.Logger) (string, error)

func ExposeLocal

func ExposeLocal(vClusterName, vClusterNamespace string, rawConfig, vRawConfig *clientcmdapi.Config, service *corev1.Service, localPort int, log log.Logger) (string, error)

func IsDockerInstalledAndUpAndRunning

func IsDockerInstalledAndUpAndRunning() bool

Types

type ClusterType

type ClusterType string
const (
	ClusterTypeUnknown        ClusterType = "unknown"
	ClusterTypeVCluster       ClusterType = "vcluster"
	ClusterTypeMinikube       ClusterType = "minikube"
	ClusterTypeDockerDesktop  ClusterType = "docker-desktop"
	ClusterTypeMicroK8s       ClusterType = "microk8s"
	ClusterTypeCRC            ClusterType = "crc"
	ClusterTypeKrucible       ClusterType = "krucible"
	ClusterTypeKIND           ClusterType = "kind"
	ClusterTypeK3D            ClusterType = "k3d"
	ClusterTypeRancherDesktop ClusterType = "rancher-desktop"
	ClusterTypeColima         ClusterType = "colima"
)

func DetectClusterType

func DetectClusterType(config *clientcmdapi.Config) ClusterType

DetectClusterType detects the k8s distro locally. Mostly taken from github.com/tilt-dev/clusterid, with some adjustments for vcluster

func (ClusterType) LocalKubernetes

func (c ClusterType) LocalKubernetes() bool

func (ClusterType) String

func (c ClusterType) String() string

Jump to

Keyboard shortcuts

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