v2beta1

package
v0.0.0-...-a49f6f1 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2024 License: Apache-2.0 Imports: 52 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ApiRebalanceV4 = "api/v4/load_rebalance"
	ApiRebalanceV5 = "api/v5/load_rebalance"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type EMQXReconciler

type EMQXReconciler struct {
	*handler.Handler
	Clientset     *kubernetes.Clientset
	Config        *rest.Config
	Scheme        *runtime.Scheme
	EventRecorder record.EventRecorder
}

EMQXReconciler reconciles a EMQX object

func NewEMQXReconciler

func NewEMQXReconciler(mgr manager.Manager) *EMQXReconciler

func (*EMQXReconciler) Reconcile

func (r *EMQXReconciler) 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. TODO(user): Modify the Reconcile function to compare the state specified by the EMQX object against the actual cluster state, and then perform operations to make the cluster state reflect the state specified by the user.

For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.8.3/pkg/reconcile

func (*EMQXReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

type EventsByLastTimestamp

type EventsByLastTimestamp []*corev1.Event

EventsByLastTimestamp sorts a list of Event by last timestamp, using their creation timestamp as a tie breaker.

func (EventsByLastTimestamp) Len

func (o EventsByLastTimestamp) Len() int

func (EventsByLastTimestamp) Less

func (o EventsByLastTimestamp) Less(i, j int) bool

func (EventsByLastTimestamp) Swap

func (o EventsByLastTimestamp) Swap(i, j int)

type GetRebalanceStatusFunc

type GetRebalanceStatusFunc func(emqx client.Object, requester innerReq.RequesterInterface) ([]appsv2beta1.RebalanceState, error)

Rebalance Handler

type PodsByCreationTimestamp

type PodsByCreationTimestamp []*corev1.Pod

PodsByCreationTimestamp sorts a list of Pod by creation timestamp, using their names as a tie breaker.

func (PodsByCreationTimestamp) Len

func (o PodsByCreationTimestamp) Len() int

func (PodsByCreationTimestamp) Less

func (o PodsByCreationTimestamp) Less(i, j int) bool

func (PodsByCreationTimestamp) Swap

func (o PodsByCreationTimestamp) Swap(i, j int)

type PodsByNameNewer

type PodsByNameNewer []*corev1.Pod

PodsByNameNewer sorts a list of Pod by size in descending order, using their creation timestamp or name as a tie breaker. By using the creation timestamp, this sorts from new to old replica sets.

func (PodsByNameNewer) Len

func (o PodsByNameNewer) Len() int

func (PodsByNameNewer) Less

func (o PodsByNameNewer) Less(i, j int) bool

func (PodsByNameNewer) Swap

func (o PodsByNameNewer) Swap(i, j int)

type PodsByNameOlder

type PodsByNameOlder []*corev1.Pod

PodsByNameOlder sorts a list of Pod by size in descending order, using their creation timestamp or name as a tie breaker. By using the creation timestamp, this sorts from old to new replica sets.

func (PodsByNameOlder) Len

func (o PodsByNameOlder) Len() int

func (PodsByNameOlder) Less

func (o PodsByNameOlder) Less(i, j int) bool

func (PodsByNameOlder) Swap

func (o PodsByNameOlder) Swap(i, j int)

type RebalanceReconciler

type RebalanceReconciler struct {
	Client        client.Client
	Clientset     *kubernetes.Clientset
	Config        *rest.Config
	EventRecorder record.EventRecorder
}

RebalanceReconciler reconciles a Rebalance object

func NewRebalanceReconciler

func NewRebalanceReconciler(mgr manager.Manager) *RebalanceReconciler

func (*RebalanceReconciler) Reconcile

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

func (*RebalanceReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

type ReplicaSetsByCreationTimestamp

type ReplicaSetsByCreationTimestamp []*appsv1.ReplicaSet

ReplicaSetsByCreationTimestamp sorts a list of ReplicaSet by creation timestamp, using their names as a tie breaker.

func (ReplicaSetsByCreationTimestamp) Len

func (ReplicaSetsByCreationTimestamp) Less

func (ReplicaSetsByCreationTimestamp) Swap

func (o ReplicaSetsByCreationTimestamp) Swap(i, j int)

type StartRebalanceFunc

type StartRebalanceFunc func(emqx client.Object, requester innerReq.RequesterInterface, rebalance *appsv2beta1.Rebalance) error

type StatefulSetsByCreationTimestamp

type StatefulSetsByCreationTimestamp []*appsv1.StatefulSet

StatefulSetsByCreationTimestamp sorts a list of StatefulSet by creation timestamp, using their names as a tie breaker.

func (StatefulSetsByCreationTimestamp) Len

func (StatefulSetsByCreationTimestamp) Less

func (StatefulSetsByCreationTimestamp) Swap

func (o StatefulSetsByCreationTimestamp) Swap(i, j int)

type StopRebalanceFunc

type StopRebalanceFunc func(emqx client.Object, requester innerReq.RequesterInterface, rebalance *appsv2beta1.Rebalance) error

Jump to

Keyboard shortcuts

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