Documentation ¶
Index ¶
- Constants
- func DeriveBackupPolicyName(clusterName, componentDef, identifier string) string
- func NewClusterPlanBuilder(ctx intctrlutil.RequestCtx, cli client.Client, req ctrl.Request) graph.PlanBuilder
- type AssureMetaTransformer
- type BackupPolicyTPLTransformer
- type ClusterCredentialTransformer
- type ClusterDeletionTransformer
- type ClusterStatusTransformer
- type ClusterTransformContext
- type ComponentTransformer
- type ConfigTransformer
- type FillClassTransformer
- type HaltRecoveryTransformer
- type OwnershipTransformer
- type PITRTransformer
- type ParallelTransformers
- type SecretTransformer
- type ValidateAndLoadRefResourcesTransformer
- type ValidateEnableLogsTransformer
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 )
Variables ¶
This section is empty.
Functions ¶
func DeriveBackupPolicyName ¶
DeriveBackupPolicyName generates the backup policy name which is created from backup policy template.
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 ClusterCredentialTransformer ¶
type ClusterCredentialTransformer struct{}
ClusterCredentialTransformer creates the connection credential secret
func (*ClusterCredentialTransformer) Transform ¶
func (c *ClusterCredentialTransformer) 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 ComponentTransformer ¶
ComponentTransformer transforms all components to a K8s objects DAG
func (*ComponentTransformer) Transform ¶
func (c *ComponentTransformer) 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 FillClassTransformer ¶
type FillClassTransformer struct{}
FillClassTransformer fill the class related info to cluster
func (*FillClassTransformer) Transform ¶
func (r *FillClassTransformer) 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 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 SecretTransformer ¶
type SecretTransformer struct{}
SecretTransformer puts all the secrets at the beginning of the DAG
func (*SecretTransformer) Transform ¶
func (c *SecretTransformer) 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
Source Files ¶
- cluster_plan_builder.go
- cluster_status_conditions.go
- transform_types.go
- transform_utils.go
- transformer_assure_meta.go
- transformer_backup_policy_tpl.go
- transformer_cluster_credential.go
- transformer_cluster_deletion.go
- transformer_cluster_status.go
- transformer_component.go
- transformer_config.go
- transformer_fill_class.go
- transformer_halt_recovering.go
- transformer_init.go
- transformer_ownership.go
- transformer_pitr.go
- transformer_secret.go
- transformer_validate_and_load_ref_resources.go
- transformer_validate_enable_logs.go
- transformers_parallel.go