helpers

package
v0.0.0-...-e716107 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2022 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ClusterRegistrarFinalizer  string = "clusterregistrar.open-cluster-management.io/cleanup"
	RegisteredClusterFinalizer string = "registeredcluster.open-cluster-management.io/cleanup"
)

Variables

This section is empty.

Functions

func GetConditionStatus

func GetConditionStatus(conditions []metav1.Condition, t string) (status metav1.ConditionStatus, ok bool)

GetConditionStatus returns the status for a given condition type and whether the condition was found

func ManagedClusterSetNameForWorkspace

func ManagedClusterSetNameForWorkspace(workspaceName string) string

func MergeStatusConditions

func MergeStatusConditions(conditions []metav1.Condition, newConditions ...metav1.Condition) []metav1.Condition

MergeStatusConditions returns a new status condition array with merged status conditions. It is based on newConditions, and merges the corresponding existing conditions if exists.

func RandomString

func RandomString(strSize int, randType RandomType) string

Types

type HubInstance

type HubInstance struct {
	HubConfig          *singaporev1alpha1.HubConfig
	Cluster            cluster.Cluster
	Client             client.Client
	KubeClient         kubernetes.Interface
	DynamicClient      dynamic.Interface
	APIExtensionClient apiextensionsclient.Interface
	HubApplier         clusteradmapply.Applier
}

func GetHubCluster

func GetHubCluster(workspace string, hubInstances []HubInstance) (HubInstance, error)

func GetHubClusters

func GetHubClusters(mgr ctrl.Manager) ([]HubInstance, error)

type RandomType

type RandomType string
const (
	RandomTypeNumber   RandomType = "number"
	RandomTypeAlpha    RandomType = "alpha"
	RandomTypeAlphaNum RandomType = "alphanum"
	RandomTypePassword RandomType = "password"
)

Jump to

Keyboard shortcuts

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