consensusset

package
v0.6.0-alpha.21 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2023 License: AGPL-3.0 Imports: 40 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrContinue error
	ErrWait     = errors.New("wait")
	ErrStop     = errors.New("stop")
)

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

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 (*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

Create implements EventHandler.

func (*EnqueueRequestForAncestor) Delete

Delete implements EventHandler.

func (*EnqueueRequestForAncestor) Generic

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

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

type ObjectGenerationTransformer

type ObjectGenerationTransformer struct{}

func (*ObjectGenerationTransformer) Transform

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

Jump to

Keyboard shortcuts

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