Documentation ¶
Index ¶
- Constants
- Variables
- func CurrentContext() (string, *clientcmdapi.Config, error)
- func FormatOptions(format string, options [][]string) []string
- func GetPlatformVCluster(ctx context.Context, platformClient platform.Client, name, project string, ...) (*platform.VirtualClusterInstanceProject, error)
- func GetPodStatus(pod *corev1.Pod) string
- func SwitchContext(kubeConfig *clientcmdapi.Config, otherContext string) error
- func VClusterConnectBackgroundProxyName(vClusterName string, vClusterNamespace string, currentContext string) string
- func VClusterContextName(vClusterName string, vClusterNamespace string, currentContext string) string
- func VClusterFromContext(originalContext string) (name string, namespace string, context string)
- func VClusterPlatformContextName(vClusterName string, projectName string, currentContext string) string
- func VClusterPlatformFromContext(originalContext string) (name string, project string, context string)
- type Status
- type VCluster
- func GetVCluster(ctx context.Context, context, name, namespace string, log log.Logger) (*VCluster, error)
- func ListOSSVClusters(ctx context.Context, context, name, namespace string) ([]VCluster, error)
- func ListVClusters(ctx context.Context, context, name, namespace string, log log.Logger) ([]VCluster, error)
- type VClusterNotFoundError
Constants ¶
View Source
const VirtualClusterSelector = "app=vcluster"
Variables ¶
View Source
var NonAllowedCharactersRegEx = regexp.MustCompile(`[^a-zA-Z0-9\-_]+`)
Functions ¶
func CurrentContext ¶
func CurrentContext() (string, *clientcmdapi.Config, error)
func FormatOptions ¶
func GetPlatformVCluster ¶
func GetPodStatus ¶
GetPodStatus returns the pod status as a string Taken from https://github.com/kubernetes/kubernetes/pkg/printers/internalversion/printers.go
func SwitchContext ¶
func SwitchContext(kubeConfig *clientcmdapi.Config, otherContext string) error
func VClusterContextName ¶
func VClusterFromContext ¶
Types ¶
type VCluster ¶
type VCluster struct { ClientFactory clientcmd.ClientConfig `json:"-"` Created metav1.Time Name string Namespace string Annotations map[string]string Labels map[string]string Status Status Context string Version string }
func GetVCluster ¶
func ListOSSVClusters ¶
func ListVClusters ¶
func (*VCluster) GetAnnotations ¶
GetAnnotations implements Annotated
func (*VCluster) IsSleeping ¶
type VClusterNotFoundError ¶
type VClusterNotFoundError struct {
Name string
}
func (*VClusterNotFoundError) Error ¶
func (e *VClusterNotFoundError) Error() string
Click to show internal directories.
Click to hide internal directories.