Documentation ¶
Index ¶
- Constants
- func NewClusterPlanBuilder(ctx intctrlutil.RequestCtx, cli client.Client, req ctrl.Request) graph.PlanBuilder
- type AssureMetaTransformer
- type BackupPolicyTplTransformer
- func (c BackupPolicyTplTransformer) GetClient() roclient.ReadonlyClient
- func (c BackupPolicyTplTransformer) GetContext() context.Context
- func (c BackupPolicyTplTransformer) GetLogger() logr.Logger
- func (c BackupPolicyTplTransformer) GetRecorder() record.EventRecorder
- func (r *BackupPolicyTplTransformer) Transform(ctx graph.TransformContext, dag *graph.DAG) error
- type ClusterCredentialTransformer
- type ClusterDefinitionReconciler
- type ClusterDeletionTransformer
- type ClusterReconciler
- type ClusterStatusEventHandler
- type ClusterStatusTransformer
- type ClusterVersionReconciler
- type ComponentClassReconciler
- type ComponentTransformer
- type HaltRecoveryTransformer
- type OpsRequestReconciler
- type OwnershipTransformer
- type ParallelTransformers
- type RBACTransformer
- type RestoreTransformer
- type SecretTransformer
- type ServiceDescriptorReconciler
- type SystemAccountReconciler
- type ValidateAndLoadRefResourcesTransformer
- type ValidateEnableLogsTransformer
Constants ¶
const ( ReasonPreCheckSucceed = "PreCheckSucceed" // ReasonPreCheckSucceed preChecks succeeded 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 succeeded 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 is running )
const ( SysAcctDelete = "SysAcctDelete" SysAcctCreate = "SysAcctCreate" SysAcctUnsupported = "SysAcctUnsupported" )
SysAccountDeletion and SysAccountCreation are used as event reasons.
const EventTimeOut = 30 * time.Second
EventTimeOut timeout of the event
Variables ¶
This section is empty.
Functions ¶
func NewClusterPlanBuilder ¶ added in v0.6.0
func NewClusterPlanBuilder(ctx intctrlutil.RequestCtx, cli client.Client, req ctrl.Request) graph.PlanBuilder
NewClusterPlanBuilder returns a clusterPlanBuilder powered PlanBuilder
Types ¶
type AssureMetaTransformer ¶ added in v0.6.0
type AssureMetaTransformer struct{}
func (*AssureMetaTransformer) Transform ¶ added in v0.6.0
func (t *AssureMetaTransformer) Transform(ctx graph.TransformContext, dag *graph.DAG) error
type BackupPolicyTplTransformer ¶ added in v0.7.0
type BackupPolicyTplTransformer struct {
// contains filtered or unexported fields
}
BackupPolicyTplTransformer transforms the backup policy template to the data protection backup policy and backup schedule.
func (BackupPolicyTplTransformer) GetClient ¶ added in v0.7.0
func (c BackupPolicyTplTransformer) GetClient() roclient.ReadonlyClient
func (BackupPolicyTplTransformer) GetContext ¶ added in v0.7.0
func (BackupPolicyTplTransformer) GetRecorder ¶ added in v0.7.0
func (c BackupPolicyTplTransformer) GetRecorder() record.EventRecorder
func (*BackupPolicyTplTransformer) Transform ¶ added in v0.7.0
func (r *BackupPolicyTplTransformer) Transform(ctx graph.TransformContext, dag *graph.DAG) error
Transform transforms the backup policy template to the backup policy and backup schedule.
type ClusterCredentialTransformer ¶ added in v0.6.0
type ClusterCredentialTransformer struct{}
ClusterCredentialTransformer creates the connection credential secret
func (*ClusterCredentialTransformer) Transform ¶ added in v0.6.0
func (c *ClusterCredentialTransformer) Transform(ctx graph.TransformContext, dag *graph.DAG) error
type ClusterDefinitionReconciler ¶
type ClusterDefinitionReconciler struct { client.Client Scheme *k8sruntime.Scheme Recorder record.EventRecorder }
ClusterDefinitionReconciler reconciles a ClusterDefinition object
func (*ClusterDefinitionReconciler) Reconcile ¶
func (r *ClusterDefinitionReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state.
For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.14.4/pkg/reconcile
func (*ClusterDefinitionReconciler) SetupWithManager ¶
func (r *ClusterDefinitionReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type ClusterDeletionTransformer ¶ added in v0.6.0
type ClusterDeletionTransformer struct{}
ClusterDeletionTransformer handles cluster deletion
func (*ClusterDeletionTransformer) Transform ¶ added in v0.6.0
func (t *ClusterDeletionTransformer) Transform(ctx graph.TransformContext, dag *graph.DAG) error
type ClusterReconciler ¶
type ClusterReconciler struct { client.Client Scheme *runtime.Scheme Recorder record.EventRecorder }
ClusterReconciler reconciles a Cluster object
func (*ClusterReconciler) Reconcile ¶
Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state.
For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.14.4/pkg/reconcile
func (*ClusterReconciler) SetupWithManager ¶
func (r *ClusterReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type ClusterStatusEventHandler ¶
type ClusterStatusEventHandler struct{}
ClusterStatusEventHandler is the event handler for the cluster status event
func (*ClusterStatusEventHandler) Handle ¶
func (r *ClusterStatusEventHandler) Handle(cli client.Client, reqCtx intctrlutil.RequestCtx, recorder record.EventRecorder, event *corev1.Event) error
Handle handles the cluster status events.
type ClusterStatusTransformer ¶ added in v0.6.0
type ClusterStatusTransformer struct {
// contains filtered or unexported fields
}
func (*ClusterStatusTransformer) Transform ¶ added in v0.6.0
func (t *ClusterStatusTransformer) Transform(ctx graph.TransformContext, dag *graph.DAG) error
type ClusterVersionReconciler ¶
type ClusterVersionReconciler struct { client.Client Scheme *k8sruntime.Scheme Recorder record.EventRecorder }
ClusterVersionReconciler reconciles a ClusterVersion object
func (*ClusterVersionReconciler) Reconcile ¶
func (r *ClusterVersionReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state.
For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.14.4/pkg/reconcile
func (*ClusterVersionReconciler) SetupWithManager ¶
func (r *ClusterVersionReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type ComponentClassReconciler ¶
type ComponentClassReconciler struct { client.Client Scheme *k8sruntime.Scheme Recorder record.EventRecorder }
func (*ComponentClassReconciler) SetupWithManager ¶
func (r *ComponentClassReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type ComponentTransformer ¶ added in v0.6.0
ComponentTransformer transforms all components to a K8s objects DAG
func (*ComponentTransformer) Transform ¶ added in v0.6.0
func (c *ComponentTransformer) Transform(ctx graph.TransformContext, dag *graph.DAG) error
type HaltRecoveryTransformer ¶ added in v0.6.0
type HaltRecoveryTransformer struct{}
func (*HaltRecoveryTransformer) Transform ¶ added in v0.6.0
func (t *HaltRecoveryTransformer) Transform(ctx graph.TransformContext, dag *graph.DAG) error
type OpsRequestReconciler ¶
type OpsRequestReconciler struct { client.Client Scheme *runtime.Scheme Recorder record.EventRecorder }
OpsRequestReconciler reconciles a OpsRequest object
func (*OpsRequestReconciler) Reconcile ¶
func (r *OpsRequestReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.11.0/pkg/reconcile
func (*OpsRequestReconciler) SetupWithManager ¶
func (r *OpsRequestReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type OwnershipTransformer ¶ added in v0.6.0
type OwnershipTransformer struct{}
OwnershipTransformer adds finalizer to all none cluster objects
func (*OwnershipTransformer) Transform ¶ added in v0.6.0
func (f *OwnershipTransformer) Transform(ctx graph.TransformContext, dag *graph.DAG) error
type ParallelTransformers ¶ added in v0.6.0
type ParallelTransformers struct {
// contains filtered or unexported fields
}
func (*ParallelTransformers) Transform ¶ added in v0.6.0
func (t *ParallelTransformers) Transform(ctx graph.TransformContext, dag *graph.DAG) error
type RBACTransformer ¶ added in v0.6.0
type RBACTransformer struct{}
RBACTransformer puts the rbac at the beginning of the DAG
func (*RBACTransformer) Transform ¶ added in v0.6.0
func (c *RBACTransformer) Transform(ctx graph.TransformContext, dag *graph.DAG) error
type RestoreTransformer ¶ added in v0.6.0
func (*RestoreTransformer) Transform ¶ added in v0.6.0
func (t *RestoreTransformer) Transform(ctx graph.TransformContext, dag *graph.DAG) error
type SecretTransformer ¶ added in v0.6.0
type SecretTransformer struct{}
SecretTransformer puts all the secrets at the beginning of the DAG
func (*SecretTransformer) Transform ¶ added in v0.6.0
func (c *SecretTransformer) Transform(ctx graph.TransformContext, dag *graph.DAG) error
type ServiceDescriptorReconciler ¶ added in v0.7.0
type ServiceDescriptorReconciler struct { client.Client Scheme *runtime.Scheme Recorder record.EventRecorder }
ServiceDescriptorReconciler reconciles a ServiceDescriptor object
func (*ServiceDescriptorReconciler) Reconcile ¶ added in v0.7.0
func (r *ServiceDescriptorReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. TODO(user): Modify the Reconcile function to compare the state specified by the ServiceDescriptor object against the actual cluster state, and then perform operations to make the cluster state reflect the state specified by the user.
For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.14.4/pkg/reconcile
func (*ServiceDescriptorReconciler) SetupWithManager ¶ added in v0.7.0
func (r *ServiceDescriptorReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type SystemAccountReconciler ¶
type SystemAccountReconciler struct { client.Client Scheme *runtime.Scheme Recorder record.EventRecorder }
SystemAccountReconciler reconciles a SystemAccount object.
func (*SystemAccountReconciler) Reconcile ¶
func (r *SystemAccountReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. TODO(user): Modify the Reconcile function to compare the state specified by the SystemAccount object against the actual cluster state, and then perform operations to make the cluster state reflect the state specified by the user.
For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.13.0/pkg/reconcile
func (*SystemAccountReconciler) SetupWithManager ¶
func (r *SystemAccountReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type ValidateAndLoadRefResourcesTransformer ¶ added in v0.6.0
type ValidateAndLoadRefResourcesTransformer struct{}
ValidateAndLoadRefResourcesTransformer handles referenced resources'(cd & cv) validation and load them into context
func (*ValidateAndLoadRefResourcesTransformer) Transform ¶ added in v0.6.0
func (t *ValidateAndLoadRefResourcesTransformer) Transform(ctx graph.TransformContext, dag *graph.DAG) error
type ValidateEnableLogsTransformer ¶ added in v0.6.0
type ValidateEnableLogsTransformer struct{}
ValidateEnableLogsTransformer validates config and sends warning event log if necessary
func (*ValidateEnableLogsTransformer) Transform ¶ added in v0.6.0
func (e *ValidateEnableLogsTransformer) Transform(ctx graph.TransformContext, dag *graph.DAG) error
Source Files ¶
- class_controller.go
- cluster_controller.go
- cluster_plan_builder.go
- cluster_status_conditions.go
- cluster_status_event_handler.go
- clusterdefinition_controller.go
- clusterversion_controller.go
- const.go
- opsrequest_controller.go
- servicedescriptor_controller.go
- systemaccount_controller.go
- systemaccount_util.go
- transform_restore.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_halt_recovering.go
- transformer_init.go
- transformer_ownership.go
- transformer_rbac.go
- transformer_secret.go
- transformer_validate_and_load_ref_resources.go
- transformer_validate_enable_logs.go
- transformers_parallel.go
- utils.go