Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var EventHandlerMap = map[string]EventHandler{}
var PersistentVolumeClaimHandlerMap = map[string]HandlePersistentVolumeClaim{}
Functions ¶
Types ¶
type EventHandler ¶
type EventHandler interface {
Handle(client.Client, intctrlutil.RequestCtx, record.EventRecorder, *corev1.Event) error
}
type EventReconciler ¶
EventReconciler reconciles an Event object
func (*EventReconciler) 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.
For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.14.4/pkg/reconcile
func (*EventReconciler) SetupWithManager ¶
func (r *EventReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type HandlePersistentVolumeClaim ¶
type HandlePersistentVolumeClaim func(reqCtx intctrlutil.RequestCtx, cli client.Client, pvc *corev1.PersistentVolumeClaim) error
type PersistentVolumeClaimReconciler ¶
type PersistentVolumeClaimReconciler struct { client.Client Scheme *runtime.Scheme Recorder record.EventRecorder }
PersistentVolumeClaimReconciler reconciles a PersistentVolumeClaim object
func (*PersistentVolumeClaimReconciler) Reconcile ¶
func (r *PersistentVolumeClaimReconciler) 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.4/pkg/reconcile
func (*PersistentVolumeClaimReconciler) SetupWithManager ¶
func (r *PersistentVolumeClaimReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type ProbeEventType ¶
type ProbeEventType string
ProbeEventType defines the type of probe event.
const ( ProbeEventOperationNotImpl ProbeEventType = "OperationNotImplemented" ProbeEventCheckRoleFailed ProbeEventType = "checkRoleFailed" ProbeEventRoleInvalid ProbeEventType = "roleInvalid" ProbeEventRoleChanged ProbeEventType = "roleChanged" ProbeEventRoleUnChanged ProbeEventType = "roleUnChanged" )
type ProbeMessage ¶
type ProbeMessage struct { Event ProbeEventType `json:"event,omitempty"` Message string `json:"message,omitempty"` OriginalRole string `json:"originalRole,omitempty"` Role string `json:"role,omitempty"` }
func ParseProbeEventMessage ¶
func ParseProbeEventMessage(reqCtx intctrlutil.RequestCtx, event *corev1.Event) *ProbeMessage
ParseProbeEventMessage parses probe event message.
type RoleChangeEventHandler ¶
type RoleChangeEventHandler struct{}
RoleChangeEventHandler is the event handler for the role change event
func (*RoleChangeEventHandler) Handle ¶
func (r *RoleChangeEventHandler) Handle(cli client.Client, reqCtx intctrlutil.RequestCtx, recorder record.EventRecorder, event *corev1.Event) error
Handle handles role changed event.