find

package
v0.19.5 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const VirtualClusterSelector = "app=vcluster"

Variables

This section is empty.

Functions

func CurrentContext

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

func FormatOptions added in v0.16.0

func FormatOptions(format string, options [][]string) []string

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 SwitchContext added in v0.16.0

func SwitchContext(kubeConfig *clientcmdapi.Config, otherContext string) error

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, projectName 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 procli.Client, context, name, namespace, project string, log log.Logger) (*VCluster, *procli.VirtualClusterInstanceProject, error)

func ListOSSVClusters added in v0.16.0

func ListOSSVClusters(ctx context.Context, context, name, namespace string) ([]VCluster, error)

func ListVClusters

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

type VclusterNotFoundError added in v0.19.0

type VclusterNotFoundError struct {
	Name string
}

func (*VclusterNotFoundError) Error added in v0.19.0

func (e *VclusterNotFoundError) Error() string

Jump to

Keyboard shortcuts

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