Documentation ¶
Index ¶
- Variables
- func NewCSSetPlanBuilder(ctx intctrlutil.RequestCtx, cli client.Client, req ctrl.Request) graph.PlanBuilder
- type CSSetDeletionTransformer
- type CSSetStatusTransformer
- type CSSetTransformContext
- type EnqueueRequestForAncestor
- func (e *EnqueueRequestForAncestor) Create(evt event.CreateEvent, q workqueue.RateLimitingInterface)
- func (e *EnqueueRequestForAncestor) Delete(evt event.DeleteEvent, q workqueue.RateLimitingInterface)
- func (e *EnqueueRequestForAncestor) Generic(evt event.GenericEvent, q workqueue.RateLimitingInterface)
- func (e *EnqueueRequestForAncestor) InjectMapper(m meta.RESTMapper) error
- func (e *EnqueueRequestForAncestor) InjectScheme(s *runtime.Scheme) error
- func (e *EnqueueRequestForAncestor) Update(evt event.UpdateEvent, q workqueue.RateLimitingInterface)
- type FixMetaTransformer
- type MemberReconfigurationTransformer
- type ObjectGenerationTransformer
- type PodRoleEventHandler
- type UpdateStrategyTransformer
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func NewCSSetPlanBuilder ¶
func NewCSSetPlanBuilder(ctx intctrlutil.RequestCtx, cli client.Client, req ctrl.Request) graph.PlanBuilder
NewCSSetPlanBuilder returns a csSetPlanBuilder powered PlanBuilder
Types ¶
type CSSetDeletionTransformer ¶
type CSSetDeletionTransformer struct{}
CSSetDeletionTransformer handles ConsensusSet deletion
func (*CSSetDeletionTransformer) Transform ¶
func (t *CSSetDeletionTransformer) Transform(ctx graph.TransformContext, dag *graph.DAG) error
type CSSetStatusTransformer ¶
type CSSetStatusTransformer struct{}
CSSetStatusTransformer computes the current status: 1. read the underlying sts's status and copy them to consensus set's status 2. read pod role label and update consensus set's status role fields
func (*CSSetStatusTransformer) Transform ¶
func (t *CSSetStatusTransformer) Transform(ctx graph.TransformContext, dag *graph.DAG) error
type CSSetTransformContext ¶
type CSSetTransformContext struct { context.Context Client roclient.ReadonlyClient record.EventRecorder logr.Logger CSSet *workloads.ConsensusSet OrigCSSet *workloads.ConsensusSet }
func (*CSSetTransformContext) GetClient ¶
func (c *CSSetTransformContext) GetClient() roclient.ReadonlyClient
func (*CSSetTransformContext) GetContext ¶
func (c *CSSetTransformContext) GetContext() context.Context
func (*CSSetTransformContext) GetLogger ¶
func (c *CSSetTransformContext) GetLogger() logr.Logger
func (*CSSetTransformContext) GetRecorder ¶
func (c *CSSetTransformContext) GetRecorder() record.EventRecorder
type EnqueueRequestForAncestor ¶
type EnqueueRequestForAncestor struct { // Client used to get owner object of Client roclient.ReadonlyClient // OwnerType is the type of the Owner object to look for in OwnerReferences. Only Group and Kind are compared. OwnerType runtime.Object // find event source up to UpToLevel UpToLevel int // contains filtered or unexported fields }
EnqueueRequestForAncestor enqueues Requests for the ancestor object. E.g. the ancestor object creates the StatefulSet/Deployment which then creates the Pod.
If a ConsensusSet creates Pods, users may reconcile the ConsensusSet in response to Pod Events using:
- a source.Kind Source with Type of Pod.
- a EnqueueRequestForAncestor EventHandler with an OwnerType of ConsensusSet and UpToLevel set to 2.
If source kind is corev1.Event, Event.InvolvedObject will be used as the source kind
func (*EnqueueRequestForAncestor) Create ¶
func (e *EnqueueRequestForAncestor) Create(evt event.CreateEvent, q workqueue.RateLimitingInterface)
Create implements EventHandler.
func (*EnqueueRequestForAncestor) Delete ¶
func (e *EnqueueRequestForAncestor) Delete(evt event.DeleteEvent, q workqueue.RateLimitingInterface)
Delete implements EventHandler.
func (*EnqueueRequestForAncestor) Generic ¶
func (e *EnqueueRequestForAncestor) Generic(evt event.GenericEvent, q workqueue.RateLimitingInterface)
Generic implements EventHandler.
func (*EnqueueRequestForAncestor) InjectMapper ¶
func (e *EnqueueRequestForAncestor) InjectMapper(m meta.RESTMapper) error
InjectMapper is called by the Controller to provide the rest mapper used by the manager.
func (*EnqueueRequestForAncestor) InjectScheme ¶
func (e *EnqueueRequestForAncestor) InjectScheme(s *runtime.Scheme) error
InjectScheme is called by the Controller to provide a singleton scheme to the EnqueueRequestForAncestor.
func (*EnqueueRequestForAncestor) Update ¶
func (e *EnqueueRequestForAncestor) Update(evt event.UpdateEvent, q workqueue.RateLimitingInterface)
Update implements EventHandler.
type FixMetaTransformer ¶
type FixMetaTransformer struct{}
func (*FixMetaTransformer) Transform ¶
func (t *FixMetaTransformer) Transform(ctx graph.TransformContext, dag *graph.DAG) error
type MemberReconfigurationTransformer ¶
type MemberReconfigurationTransformer struct{}
MemberReconfigurationTransformer handles member reconfiguration
func (*MemberReconfigurationTransformer) Transform ¶
func (t *MemberReconfigurationTransformer) Transform(ctx graph.TransformContext, dag *graph.DAG) error
type ObjectGenerationTransformer ¶
type ObjectGenerationTransformer struct{}
func (*ObjectGenerationTransformer) Transform ¶
func (t *ObjectGenerationTransformer) Transform(ctx graph.TransformContext, dag *graph.DAG) error
type PodRoleEventHandler ¶
type PodRoleEventHandler struct{}
func (*PodRoleEventHandler) Handle ¶
func (h *PodRoleEventHandler) Handle(cli client.Client, reqCtx intctrlutil.RequestCtx, recorder record.EventRecorder, event *corev1.Event) error
type UpdateStrategyTransformer ¶
type UpdateStrategyTransformer struct{}
func (*UpdateStrategyTransformer) Transform ¶
func (t *UpdateStrategyTransformer) Transform(ctx graph.TransformContext, dag *graph.DAG) error