Documentation
¶
Overview ¶
Package controller implements the Kubernetes reconciliation logic for Valkey custom resources.
Package controller implements the Kubernetes reconciliation logic for Valkey custom resources.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InstanceChecker ¶ added in v1.0.1
type InstanceChecker interface {
PingPod(ctx context.Context, v *vkov1.Valkey, podName string) error
CheckCluster(ctx context.Context, v *vkov1.Valkey) *health.ClusterState
GetReplicationInfo(ctx context.Context, v *vkov1.Valkey, podName string) (*valkeyclient.ReplicationInfo, error)
}
InstanceChecker verifies connectivity and health of Valkey instances. Implementations must provide PingPod for basic connectivity checks, CheckCluster for full HA cluster health verification, and GetReplicationInfo to query per-pod replication state during rolling updates.
type RollingUpdateResult ¶
type RollingUpdateResult struct {
// NeedsRequeue indicates that the reconciler should requeue after RequeueAfter.
NeedsRequeue bool
// RequeueAfter is the duration to wait before requeuing.
RequeueAfter time.Duration
// Completed indicates the rolling update has fully completed.
Completed bool
// Error holds any error encountered during the rolling update step.
Error error
}
RollingUpdateResult describes the outcome of a rolling update step.
type ValkeyPhase ¶
type ValkeyPhase = vkov1.ValkeyPhase
ValkeyPhase is a type alias to allow constructing rolling update phase strings.
type ValkeyReconciler ¶
type ValkeyReconciler struct {
client.Client
Scheme *runtime.Scheme
InstanceChecker InstanceChecker
Recorder events.EventRecorder
OperatorImage string
OperatorNamespace string
OperatorVersion string
// NewValkeyClientFn overrides the default Valkey client factory.
// Used in unit tests to avoid real TCP connections.
NewValkeyClientFn func(addr, password string, tlsConfig *tls.Config) *valkeyclient.Client
}
ValkeyReconciler reconciles a Valkey object.
func (*ValkeyReconciler) Reconcile ¶
Reconcile handles a reconciliation request for a Valkey resource.
func (*ValkeyReconciler) SetupWithManager ¶
func (r *ValkeyReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.