Documentation ¶
Index ¶
- Constants
- Variables
- func GetConditionStatus(conditions []metav1.Condition, t string) (status metav1.ConditionStatus, ok bool)
- func GetSyncerName(regClusterName string) string
- func GetSyncerPrefix() string
- func GetSyncerServiceAccountName() string
- func ManagedClusterSetNameForWorkspace(workspaceName string) string
- func MergeStatusConditions(conditions []metav1.Condition, newConditions ...metav1.Condition) []metav1.Condition
- func RandomString(strSize int, randType RandomType) string
- func RestConfigForAPIExport(ctx context.Context, cfg *rest.Config, apiExportName string, ...) (*rest.Config, error)
- type HubInstance
- type RandomType
Constants ¶
View Source
const ( ClusterRegistrarFinalizer string = "clusterregistrar.open-cluster-management.io/cleanup" RegisteredClusterFinalizer string = "registeredcluster.open-cluster-management.io/cleanup" )
Variables ¶
View Source
var (
GvrCR schema.GroupVersionResource = schema.GroupVersionResource{
Group: "singapore.open-cluster-management.io",
Version: "v1alpha1",
Resource: "clusterregistrars"}
)
View Source
var ( NewCacheFunc = func(config *rest.Config, opts cache.Options) (cache.Cache, error) { opts.NewInformerFunc = informers.NewSharedIndexInformer opts.Indexers = k8scache.Indexers{ kcpcache.ClusterIndexName: kcpcache.ClusterIndexFunc, kcpcache.ClusterAndNamespaceIndexName: kcpcache.ClusterAndNamespaceIndexFunc, } return cache.New(config, opts) } )
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 GetSyncerName ¶
func GetSyncerPrefix ¶
func GetSyncerPrefix() string
func GetSyncerServiceAccountName ¶
func GetSyncerServiceAccountName() 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
func RestConfigForAPIExport ¶
func RestConfigForAPIExport(ctx context.Context, cfg *rest.Config, apiExportName string, scheme *runtime.Scheme) (*rest.Config, error)
restConfigForAPIExport returns a *rest.Config properly configured to communicate with the endpoint for the APIExport's virtual workspace.
Types ¶
type HubInstance ¶
type HubInstance struct { HubConfig *singaporev1alpha1.HubConfig Cluster cluster.Cluster Client client.Client ApplierBuilder *clusteradmapply.ApplierBuilder }
func GetHubCluster ¶
func GetHubCluster(workspace string, hubInstances []HubInstance) (HubInstance, error)
func GetHubClusters ¶
func GetHubClusters(ctx context.Context, mgr ctrl.Manager, kubeClient kubernetes.Interface, dynamicClient dynamic.Interface) ([]HubInstance, error)
type RandomType ¶
type RandomType string
const ( RandomTypeNumber RandomType = "number" RandomTypeAlpha RandomType = "alpha" RandomTypeAlphaNum RandomType = "alphanum" RandomTypePassword RandomType = "password" )
Click to show internal directories.
Click to hide internal directories.