member

package
v1.11.0 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2023 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetNormalizedLabel

func GetNormalizedLabel(nsLabels, podLabels map[string]string, ns string) string

Types

type GatewayReconciler

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

GatewayReconciler is for member cluster only.

func NewGatewayReconciler

func NewGatewayReconciler(
	client client.Client,
	scheme *runtime.Scheme,
	namespace string,
	serviceCIDR string,
	podCIDRs []string,
	commonAreaGetter commonarea.RemoteCommonAreaGetter) *GatewayReconciler

NewGatewayReconciler creates a GatewayReconciler which will watch Gateway events and create a ClusterInfo kind of ResourceExport in the leader cluster.

func (*GatewayReconciler) Reconcile

func (r *GatewayReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

func (*GatewayReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

type LabelIdentityReconciler

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

LabelIdentityReconciler watches relevant Pod and Namespace events in the member cluster, computes the label identities added to and deleted from the cluster, and exports them to the leader cluster for further processing.

func NewLabelIdentityReconciler

func NewLabelIdentityReconciler(
	client client.Client,
	scheme *runtime.Scheme,
	commonAreaGetter commonarea.RemoteCommonAreaGetter) *LabelIdentityReconciler

func (*LabelIdentityReconciler) Reconcile

func (r *LabelIdentityReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

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

func (*LabelIdentityReconciler) Run

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

Run begins syncing of ResourceExports for label identities.

func (*LabelIdentityReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

type LabelIdentityResourceImportReconciler

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

LabelIdentityResourceImportReconciler reconciles a LabelIdentity kind of ResourceImport object in the member cluster.

func (*LabelIdentityResourceImportReconciler) Reconcile

func (*LabelIdentityResourceImportReconciler) SetupWithManager

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

type MemberClusterSetReconciler

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

MemberClusterSetReconciler reconciles a ClusterSet object in the member cluster deployment.

func NewMemberClusterSetReconciler

func NewMemberClusterSetReconciler(client client.Client,
	scheme *runtime.Scheme,
	namespace string,
	enableStretchedNetworkPolicy bool,
) *MemberClusterSetReconciler

func (*MemberClusterSetReconciler) GetRemoteCommonAreaAndLocalID

func (r *MemberClusterSetReconciler) GetRemoteCommonAreaAndLocalID() (commonarea.RemoteCommonArea, string, error)

func (*MemberClusterSetReconciler) Reconcile

Reconcile ClusterSet changes

func (*MemberClusterSetReconciler) SetRemoteCommonArea

SetRemoteCommonArea is for testing only

func (*MemberClusterSetReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

type NodeReconciler

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

NodeReconciler is for member cluster only.

func NewNodeReconciler

func NewNodeReconciler(
	client client.Client,
	scheme *runtime.Scheme,
	namespace string,
	precedence mcsv1alpha1.Precedence) *NodeReconciler

NewNodeReconciler creates a NodeReconciler to watch Node resource changes. It's responsible for creating a Gateway for the first ready Node with annotation `multicluster.antrea.io/gateway:true` if there is no existing Gateway. It guarantees there is always only one Gateway CR when there are multiple Nodes with annotation `multicluster.antrea.io/gateway:true`.

func (*NodeReconciler) Reconcile

func (r *NodeReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

func (*NodeReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

type ResourceImportReconciler

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

ResourceImportReconciler reconciles a ResourceImport object in the member cluster.

func (*ResourceImportReconciler) Reconcile

Reconcile will attempt to ensure that the imported Resource is installed in local cluster as per the ResourceImport object.

func (*ResourceImportReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the ClusterManager which will set up controllers for resources that need to be monitored in the remoteCommonArea.

type ServiceExportReconciler

type ServiceExportReconciler struct {
	client.Client

	Scheme *runtime.Scheme
	// contains filtered or unexported fields
}

ServiceExportReconciler reconciles a ServiceExport object in the member cluster.

func NewServiceExportReconciler

func NewServiceExportReconciler(
	client client.Client,
	scheme *runtime.Scheme,
	commonAreaGetter commonarea.RemoteCommonAreaGetter,
	endpointIPType string) *ServiceExportReconciler

func (*ServiceExportReconciler) Reconcile

func (r *ServiceExportReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. For ServiceExport Reconcile, it watches events of ServiceExport resources, and also Services/Endpoints resources. It will create/update/remove ResourceExport in a leader cluster for corresponding ServiceExport from a member cluster.

func (*ServiceExportReconciler) SetupWithManager

func (r *ServiceExportReconciler) 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