framework

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2022 License: MIT Imports: 19 Imported by: 0

Documentation

Overview

Copyright (c) Microsoft Corporation. Licensed under the MIT license.

Copyright (c) Microsoft Corporation. Licensed under the MIT license.

Copyright (c) Microsoft Corporation. Licensed under the MIT license.

Copyright (c) Microsoft Corporation. Licensed under the MIT license.

Index

Constants

This section is empty.

Variables

View Source
var (

	// PollInterval defines the interval time for a poll operation.
	PollInterval = 5 * time.Second
	// PollTimeout defines the time after which the poll operation times out.
	PollTimeout = 60 * time.Second
)

Functions

func CreateMemberCluster

func CreateMemberCluster(cluster Cluster, mc *v1alpha1.MemberCluster)

CreateMemberCluster creates MemberCluster in the hub cluster.

func CreateNamespace

func CreateNamespace(cluster Cluster, ns *corev1.Namespace)

CreateNamespace create namespace.

func CreateServiceAccount

func CreateServiceAccount(cluster Cluster, sa *corev1.ServiceAccount)

CreateServiceAccount create serviceaccount.

func DeleteMemberCluster

func DeleteMemberCluster(cluster Cluster, mc *v1alpha1.MemberCluster)

DeleteMemberCluster deletes MemberCluster in the hub cluster.

func DeleteNamespace

func DeleteNamespace(cluster Cluster, ns *corev1.Namespace)

DeleteNamespace delete namespace.

func DeleteServiceAccount

func DeleteServiceAccount(cluster Cluster, sa *corev1.ServiceAccount)

DeleteServiceAccount delete serviceaccount.

func GetClientConfig

func GetClientConfig(cluster *Cluster) clientcmd.ClientConfig

func GetClusterClient

func GetClusterClient(cluster *Cluster)

GetClusterClient returns a Cluster client for the cluster.

func UpdateMemberClusterState

func UpdateMemberClusterState(cluster Cluster, mc *v1alpha1.MemberCluster, state v1alpha1.ClusterState)

UpdateMemberCluster updates MemberCluster in the hub cluster.

func WaitConditionInternalMemberCluster

func WaitConditionInternalMemberCluster(cluster Cluster, imc *v1alpha1.InternalMemberCluster, conditionType v1alpha1.AgentConditionType, status metav1.ConditionStatus, customTimeout time.Duration)

WaitConditionInternalMemberCluster waits for InternalMemberCluster to present on the hub cluster with a specific condition. Allowing custom timeout as for join cond it needs longer than defined PollTimeout for the member agent to finish joining.

func WaitConditionMemberCluster

func WaitConditionMemberCluster(cluster Cluster, mc *v1alpha1.MemberCluster, conditionName string, status metav1.ConditionStatus, customTimeout time.Duration)

WaitConditionMemberCluster waits for MemberCluster to present on th hub cluster with a specific condition.

func WaitInternalMemberCluster

func WaitInternalMemberCluster(cluster Cluster, imc *v1alpha1.InternalMemberCluster)

WaitInternalMemberCluster waits for InternalMemberCluster to present on th hub cluster.

func WaitMemberCluster

func WaitMemberCluster(cluster Cluster, mc *v1alpha1.MemberCluster)

WaitMemberCluster waits for MemberCluster to present on th hub cluster.

func WaitNamespace

func WaitNamespace(cluster Cluster, nc *corev1.Namespace)

WaitNamespace wait Namespace to present on th member cluster.

Types

type Cluster

type Cluster struct {
	Scheme        *runtime.Scheme
	KubeClient    client.Client
	KubeClientSet kubernetes.Interface
	DynamicClient dynamic.Interface
	ClusterName   string
	HubURL        string
	RestMapper    meta.RESTMapper
}

func NewCluster

func NewCluster(name string, scheme *runtime.Scheme) *Cluster

Jump to

Keyboard shortcuts

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