leader

package
v1.12.2 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2023 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Overview

memberclusterannounce_controller is for leader cluster only.

Package leader is a generated GoMock package.

Index

Constants

This section is empty.

Variables

View Source
var (
	ReasonConnected    = "Connected"
	ReasonDisconnected = "Disconnected"

	MemberClusterAnnounceFinalizer = "memberclusterannounce.finalizer.antrea.io"

	TimerInterval     = 10 * time.Second
	ConnectionTimeout = 3 * TimerInterval
)
View Source
var (
	NoReadyCluster = "NoReadyCluster"
)

Functions

func GetResourceImportName

func GetResourceImportName(resExport *mcsv1alpha1.ResourceExport) types.NamespacedName

func RemoveDeletedResourceExports

func RemoveDeletedResourceExports(items []mcsv1alpha1.ResourceExport) []mcsv1alpha1.ResourceExport

We use finalizers as ResourceExport pre-delete hooks, which means when we list the ResourceExports, it will also return deleted items. RemoveDeletedResourceExports remove any ResourceExports with non-zero DeletionTimestamp which is actually deleted object.

func SvcPortsConverter

func SvcPortsConverter(svcPort []corev1.ServicePort) []mcs.ServicePort

Types

type LabelIdentityExportReconciler

type LabelIdentityExportReconciler struct {
	client.Client
	Scheme *runtime.Scheme
	// contains filtered or unexported fields
}

LabelIdentityExportReconciler watches LabelIdentity ResourceExport events in the Common Area, computes if such an event causes a new LabelIdentity to become present/stale in the entire ClusterSet, and updates ResourceImports accordingly.

func NewLabelIdentityExportReconciler

func NewLabelIdentityExportReconciler(
	client client.Client,
	scheme *runtime.Scheme,
	namespace string) *LabelIdentityExportReconciler

func (*LabelIdentityExportReconciler) Reconcile

+kubebuilder:rbac:groups=multicluster.crd.antrea.io,resources=resourceexports,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups=multicluster.crd.antrea.io,resources=resourceexports/status,verbs=get;update;patch

func (*LabelIdentityExportReconciler) Run

func (r *LabelIdentityExportReconciler) Run(stopCh <-chan struct{})

Run begins syncing of ResourceImports for label identities.

func (*LabelIdentityExportReconciler) SetupWithManager

func (r *LabelIdentityExportReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

type LeaderClusterSetReconciler

type LeaderClusterSetReconciler struct {
	client.Client
	Scheme *runtime.Scheme

	StatusManager MemberClusterStatusManager
	// contains filtered or unexported fields
}

LeaderClusterSetReconciler reconciles a ClusterSet object in the leader cluster deployment. Each ClusterSet should have one Multi-cluster Controller running in the ClusterSet' leader Namespace, so a MC Controller will be handling only a single ClusterSet in the given Namespace.

func (*LeaderClusterSetReconciler) Reconcile

Reconcile ClusterSet changes

func (*LeaderClusterSetReconciler) SetupWithManager

func (r *LeaderClusterSetReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

type MemberClusterAnnounceReconciler

type MemberClusterAnnounceReconciler struct {
	client.Client
	Scheme *runtime.Scheme
	// contains filtered or unexported fields
}

MemberClusterAnnounceReconciler reconciles a MemberClusterAnnounce object

func NewMemberClusterAnnounceReconciler

func NewMemberClusterAnnounceReconciler(client client.Client, scheme *runtime.Scheme) *MemberClusterAnnounceReconciler

func (*MemberClusterAnnounceReconciler) GetMemberClusterStatuses

func (r *MemberClusterAnnounceReconciler) GetMemberClusterStatuses() []multiclusterv1alpha1.ClusterStatus

func (*MemberClusterAnnounceReconciler) Reconcile

Reconcile implements cluster status management on the leader cluster

func (*MemberClusterAnnounceReconciler) SetupWithManager

func (r *MemberClusterAnnounceReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

type MemberClusterStatusManager

type MemberClusterStatusManager interface {
	GetMemberClusterStatuses() []multiclusterv1alpha1.ClusterStatus
}

type MockMemberClusterStatusManager

type MockMemberClusterStatusManager struct {
	// contains filtered or unexported fields
}

MockMemberClusterStatusManager is a mock of MemberClusterStatusManager interface

func NewMockMemberClusterStatusManager

func NewMockMemberClusterStatusManager(ctrl *gomock.Controller) *MockMemberClusterStatusManager

NewMockMemberClusterStatusManager creates a new mock instance

func (*MockMemberClusterStatusManager) EXPECT

EXPECT returns an object that allows the caller to indicate expected use

func (*MockMemberClusterStatusManager) GetMemberClusterStatuses

func (m *MockMemberClusterStatusManager) GetMemberClusterStatuses() []v1alpha1.ClusterStatus

GetMemberClusterStatuses mocks base method

type MockMemberClusterStatusManagerMockRecorder

type MockMemberClusterStatusManagerMockRecorder struct {
	// contains filtered or unexported fields
}

MockMemberClusterStatusManagerMockRecorder is the mock recorder for MockMemberClusterStatusManager

func (*MockMemberClusterStatusManagerMockRecorder) GetMemberClusterStatuses

func (mr *MockMemberClusterStatusManagerMockRecorder) GetMemberClusterStatuses() *gomock.Call

GetMemberClusterStatuses indicates an expected call of GetMemberClusterStatuses

type ResourceExportReconciler

type ResourceExportReconciler struct {
	client.Client
	Scheme *runtime.Scheme
}

ResourceExportReconciler reconciles a ResourceExport object in the leader cluster.

func NewResourceExportReconciler

func NewResourceExportReconciler(
	client client.Client,
	scheme *runtime.Scheme) *ResourceExportReconciler

func (*ResourceExportReconciler) Reconcile

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. Reconcile will process all kinds of ResourceExport. Service and Endpoint kinds of ResourceExport will be handled in this file, and all other kinds will have their own handler files, eg: newkind_handler.go

func (*ResourceExportReconciler) SetupWithManager

func (r *ResourceExportReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

Jump to

Keyboard shortcuts

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