find

package
v0.16.0-beta.5 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2023 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const VirtualClusterSelector = "app=vcluster"

Variables

This section is empty.

Functions

func CurrentContext

func CurrentContext() (string, *api.Config, error)

func GetPodStatus

func GetPodStatus(pod *corev1.Pod) string

GetPodStatus returns the pod status as a string Taken from https://github.com/kubernetes/kubernetes/pkg/printers/internalversion/printers.go

func VClusterConnectBackgroundProxyName added in v0.11.2

func VClusterConnectBackgroundProxyName(vClusterName string, vClusterNamespace string, currentContext string) string

func VClusterContextName

func VClusterContextName(vClusterName string, vClusterNamespace string, currentContext string) string

func VClusterFromContext

func VClusterFromContext(originalContext string) (name string, namespace string, context string)

func VClusterProContextName added in v0.16.0

func VClusterProContextName(vClusterName string, vClusterNamespace string, currentContext string) string

func VClusterProFromContext added in v0.16.0

func VClusterProFromContext(originalContext string) (name string, project string, context string)

Types

type Status

type Status string
const (
	StatusRunning Status = "Running"
	StatusPaused  Status = "Paused"
	StatusUnknown Status = "Unknown"
)

type VCluster

type VCluster struct {
	Name      string
	Namespace string

	Status        Status
	Created       metav1.Time
	Context       string
	Version       string
	ClientFactory clientcmd.ClientConfig `json:"-"`
}

func GetVCluster

func GetVCluster(ctx context.Context, proClient proclient.Client, context, name, namespace, project string, log log.Logger) (*VCluster, *pro.VirtualClusterInstanceProject, error)

func ListVClusters

func ListVClusters(ctx context.Context, proClient proclient.Client, context, name, namespace, project string, log log.Logger) ([]VCluster, []pro.VirtualClusterInstanceProject, error)

Jump to

Keyboard shortcuts

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