Documentation
¶
Index ¶
- func CleanupBackgroundProxy(proxyName string, log log.Logger) error
- func CreateBackgroundProxyContainer(_ context.Context, vClusterName, vClusterNamespace string, ...) (string, error)
- func ExposeLocal(ctx context.Context, rawConfig *clientcmdapi.Config, ...) (string, error)
- func IsDockerInstalledAndUpAndRunning() bool
- type ClusterType
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(_ context.Context, vClusterName, vClusterNamespace string, rawConfig clientcmd.ClientConfig, localPort int, log log.Logger) (string, error)
CreateBackgroundProxyContainer runs kubectl port-forward in a docker container, forwarding from the vcluster service on the host cluster to a port matching the kubernetes context for the virtual cluster.
func ExposeLocal ¶
func ExposeLocal(ctx context.Context, rawConfig *clientcmdapi.Config, vRawConfig *clientcmdapi.Config, service *corev1.Service) (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"
ClusterTypeOrbstack ClusterType = "orbstack"
)
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
Click to show internal directories.
Click to hide internal directories.