Documentation ¶
Index ¶
- Constants
- func DeriveBackupPolicyName(clusterName, componentDef, identifier string) string
- func IsRequeueError(err error) bool
- func NewClusterPlanBuilder(ctx intctrlutil.RequestCtx, cli client.Client, req ctrl.Request) graph.PlanBuilder
- type Action
- type AssureMetaTransformer
- type BackupPolicyTPLTransformer
- type ClusterDeletionTransformer
- type ClusterStatusTransformer
- type ClusterTransformContext
- type ClusterTransformer
- type ConfigTransformer
- type CredentialTransformer
- type HaltRecoveryTransformer
- type ObjectActionTransformer
- type OwnershipTransformer
- type PITRTransformer
- type ParallelTransformers
- type RequeueError
- type StsHorizontalScalingTransformer
- type StsPVCTransformer
- type StsPodsTransformer
- type TLSCertsTransformer
- type ValidateAndLoadRefResourcesTransformer
- type ValidateEnableLogsTransformer
- type WorkloadsLastTransformer
Constants ¶
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 )
const ( CREATE = Action("CREATE") UPDATE = Action("UPDATE") DELETE = Action("DELETE") STATUS = Action("STATUS") )
Variables ¶
This section is empty.
Functions ¶
func DeriveBackupPolicyName ¶
DeriveBackupPolicyName generates the backup policy name which is created from backup policy template.
func IsRequeueError ¶
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 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 ¶
func (r *BackupPolicyTPLTransformer) Transform(ctx graph.TransformContext, dag *graph.DAG) error
type ClusterDeletionTransformer ¶
type ClusterDeletionTransformer struct{}
ClusterDeletionTransformer handles cluster deletion
func (*ClusterDeletionTransformer) Transform ¶
func (t *ClusterDeletionTransformer) Transform(ctx graph.TransformContext, dag *graph.DAG) error
type ClusterStatusTransformer ¶
type ClusterStatusTransformer struct {
// contains filtered or unexported fields
}
func (*ClusterStatusTransformer) Transform ¶
func (t *ClusterStatusTransformer) Transform(ctx graph.TransformContext, dag *graph.DAG) error
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 (c *ClusterTransformContext) GetClient() roclient.ReadonlyClient
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 ¶
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 ¶
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 StsHorizontalScalingTransformer ¶
type StsHorizontalScalingTransformer struct{}
func (*StsHorizontalScalingTransformer) Transform ¶
func (t *StsHorizontalScalingTransformer) Transform(ctx graph.TransformContext, dag *graph.DAG) error
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 ¶
func (t *ValidateAndLoadRefResourcesTransformer) Transform(ctx graph.TransformContext, dag *graph.DAG) error
type ValidateEnableLogsTransformer ¶
type ValidateEnableLogsTransformer struct{}
ValidateEnableLogsTransformer validate config and send warning event log necessarily
func (*ValidateEnableLogsTransformer) Transform ¶
func (e *ValidateEnableLogsTransformer) Transform(ctx graph.TransformContext, dag *graph.DAG) error
type WorkloadsLastTransformer ¶
type WorkloadsLastTransformer struct{}
WorkloadsLastTransformer have workload objects placed last
func (*WorkloadsLastTransformer) Transform ¶
func (c *WorkloadsLastTransformer) Transform(ctx graph.TransformContext, dag *graph.DAG) error
Source Files ¶
- cluster_plan_builder.go
- cluster_plan_utils.go
- cluster_status_conditions.go
- transform_types.go
- transform_utils.go
- transformer_assure_meta.go
- transformer_backup_policy_tpl.go
- transformer_cluster.go
- transformer_cluster_deletion.go
- transformer_cluster_status.go
- transformer_config.go
- transformer_credential.go
- transformer_halt_recovering.go
- transformer_init.go
- transformer_object_action.go
- transformer_ownership.go
- transformer_pitr.go
- transformer_sts_horizontal_scaling.go
- transformer_sts_pods.go
- transformer_sts_pvc.go
- transformer_tls_certs.go
- transformer_validate_and_load_ref_resources.go
- transformer_validate_enable_logs.go
- transformer_workloads_last.go
- transformers_parallel.go