lifecycle

package
v0.5.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	ReasonOpsRequestProcessed   = "Processed"             // ReasonOpsRequestProcessed the latest OpsRequest has been processed.
	ReasonPreCheckSucceed       = "PreCheckSucceed"       // ReasonPreCheckSucceed preChecks succeed for provisioning started
	ReasonPreCheckFailed        = "PreCheckFailed"        // ReasonPreCheckFailed preChecks failed for provisioning started
	ReasonApplyResourcesFailed  = "ApplyResourcesFailed"  // ReasonApplyResourcesFailed applies resources failed to create or change the cluster
	ReasonApplyResourcesSucceed = "ApplyResourcesSucceed" // ReasonApplyResourcesSucceed applies resources succeed to create or change the cluster
	ReasonReplicasNotReady      = "ReplicasNotReady"      // ReasonReplicasNotReady the pods of components are not ready
	ReasonAllReplicasReady      = "AllReplicasReady"      // ReasonAllReplicasReady the pods of components are ready
	ReasonComponentsNotReady    = "ComponentsNotReady"    // ReasonComponentsNotReady the components of cluster are not ready
	ReasonClusterReady          = "ClusterReady"          // ReasonClusterReady the components of cluster are ready, the component phase are running
)
View Source
const (
	CREATE = Action("CREATE")
	UPDATE = Action("UPDATE")
	DELETE = Action("DELETE")
	STATUS = Action("STATUS")
)

Variables

This section is empty.

Functions

func DeriveBackupPolicyName

func DeriveBackupPolicyName(clusterName, componentDef, identifier string) string

DeriveBackupPolicyName generates the backup policy name which is created from backup policy template.

func IsRequeueError

func IsRequeueError(err error) bool

IsRequeueError checks if the error is a RequeueError

func NewClusterPlanBuilder

func NewClusterPlanBuilder(ctx intctrlutil.RequestCtx, cli client.Client, req ctrl.Request) graph.PlanBuilder

NewClusterPlanBuilder returns a clusterPlanBuilder powered PlanBuilder

Types

type Action

type Action string

type AssureMetaTransformer

type AssureMetaTransformer struct{}

func (*AssureMetaTransformer) Transform

func (t *AssureMetaTransformer) Transform(ctx graph.TransformContext, dag *graph.DAG) error

type BackupPolicyTPLTransformer

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

BackupPolicyTPLTransformer transforms the backup policy template to the backup policy.

func (*BackupPolicyTPLTransformer) Transform

type ClusterDeletionTransformer

type ClusterDeletionTransformer struct{}

ClusterDeletionTransformer handles cluster deletion

func (*ClusterDeletionTransformer) Transform

type ClusterStatusTransformer

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

func (*ClusterStatusTransformer) Transform

type ClusterTransformContext

type ClusterTransformContext struct {
	context.Context
	Client roclient.ReadonlyClient
	record.EventRecorder
	logr.Logger
	Cluster     *appsv1alpha1.Cluster
	OrigCluster *appsv1alpha1.Cluster
	ClusterDef  *appsv1alpha1.ClusterDefinition
	ClusterVer  *appsv1alpha1.ClusterVersion
}

ClusterTransformContext a graph.TransformContext implementation for Cluster reconciliation

func (*ClusterTransformContext) GetClient

func (*ClusterTransformContext) GetContext

func (c *ClusterTransformContext) GetContext() context.Context

func (*ClusterTransformContext) GetLogger

func (c *ClusterTransformContext) GetLogger() logr.Logger

func (*ClusterTransformContext) GetRecorder

func (c *ClusterTransformContext) GetRecorder() record.EventRecorder

type ClusterTransformer

type ClusterTransformer struct {
	client.Client
}

ClusterTransformer builds a Cluster into K8s objects and put them into a DAG TODO: remove cli and ctx, we should read all objects needed, and then do pure objects computation TODO: only replication set left

func (*ClusterTransformer) Transform

func (c *ClusterTransformer) Transform(ctx graph.TransformContext, dag *graph.DAG) error

type ConfigTransformer

type ConfigTransformer struct{}

ConfigTransformer makes all config related ConfigMaps immutable

func (*ConfigTransformer) Transform

func (c *ConfigTransformer) Transform(ctx graph.TransformContext, dag *graph.DAG) error

type CredentialTransformer

type CredentialTransformer struct{}

CredentialTransformer puts the credential Secret at the beginning of the DAG

func (*CredentialTransformer) Transform

func (c *CredentialTransformer) Transform(ctx graph.TransformContext, dag *graph.DAG) error

type HaltRecoveryTransformer

type HaltRecoveryTransformer struct{}

func (*HaltRecoveryTransformer) Transform

func (t *HaltRecoveryTransformer) Transform(ctx graph.TransformContext, dag *graph.DAG) error

type ObjectActionTransformer

type ObjectActionTransformer struct{}

ObjectActionTransformer reads all Vertex.Obj in cache and compute the diff DAG.

func (*ObjectActionTransformer) Transform

func (t *ObjectActionTransformer) Transform(ctx graph.TransformContext, dag *graph.DAG) error

type OwnershipTransformer

type OwnershipTransformer struct{}

OwnershipTransformer add finalizer to all none cluster objects

func (*OwnershipTransformer) Transform

func (f *OwnershipTransformer) Transform(ctx graph.TransformContext, dag *graph.DAG) error

type PITRTransformer

type PITRTransformer struct {
	client.Client
}

func (*PITRTransformer) Transform

func (t *PITRTransformer) Transform(ctx graph.TransformContext, dag *graph.DAG) error

type ParallelTransformers

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

func (*ParallelTransformers) Transform

func (t *ParallelTransformers) Transform(ctx graph.TransformContext, dag *graph.DAG) error

type RequeueError

type RequeueError interface {
	RequeueAfter() time.Duration
	Reason() string
}

type StsHorizontalScalingTransformer

type StsHorizontalScalingTransformer struct{}

func (*StsHorizontalScalingTransformer) Transform

type StsPVCTransformer

type StsPVCTransformer struct{}

func (*StsPVCTransformer) Transform

func (t *StsPVCTransformer) Transform(ctx graph.TransformContext, dag *graph.DAG) error

type StsPodsTransformer

type StsPodsTransformer struct{}

func (*StsPodsTransformer) Transform

func (t *StsPodsTransformer) Transform(ctx graph.TransformContext, dag *graph.DAG) error

type TLSCertsTransformer

type TLSCertsTransformer struct{}

TLSCertsTransformer handles tls certs provisioning or validation

func (*TLSCertsTransformer) Transform

func (t *TLSCertsTransformer) Transform(ctx graph.TransformContext, dag *graph.DAG) error

type ValidateAndLoadRefResourcesTransformer

type ValidateAndLoadRefResourcesTransformer struct{}

ValidateAndLoadRefResourcesTransformer handles referenced resources'(cd & cv) validation and load them into context

func (*ValidateAndLoadRefResourcesTransformer) Transform

type ValidateEnableLogsTransformer

type ValidateEnableLogsTransformer struct{}

ValidateEnableLogsTransformer validate config and send warning event log necessarily

func (*ValidateEnableLogsTransformer) Transform

type WorkloadsLastTransformer

type WorkloadsLastTransformer struct{}

WorkloadsLastTransformer have workload objects placed last

func (*WorkloadsLastTransformer) Transform

Jump to

Keyboard shortcuts

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