controller

package
v1.1.8 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PhaseResourcesCreated string = "resources-created"

	PhaseReady string = "ready"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DfPodLifeCycleReconciler

type DfPodLifeCycleReconciler struct {
	client.Client
	Scheme        *runtime.Scheme
	EventRecorder record.EventRecorder
}

func (*DfPodLifeCycleReconciler) 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.

This reconcile events focuses on configuring the given pods either as a `master` or `replica` as they go through their lifecycle. This also focus on the failing over to replica's part to make sure one `master` is always available.

func (*DfPodLifeCycleReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

type DragonflyInstance

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

DragonflyInstance is an abstraction over the `Dragonfly` CRD and provides methods to handle replication.

func GetDragonflyInstanceFromPod

func GetDragonflyInstanceFromPod(ctx context.Context, c client.Client, pod *corev1.Pod, log logr.Logger) (*DragonflyInstance, error)

type DragonflyReconciler

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

	EventRecorder record.EventRecorder
}

DragonflyReconciler reconciles a Dragonfly object

func (*DragonflyReconciler) Reconcile

func (r *DragonflyReconciler) 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 more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.14.1/pkg/reconcile

func (*DragonflyReconciler) SetupWithManager

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