Documentation ¶
Index ¶
- Constants
- func DelayUpdatePodSpecSystemFields(obj corev1.PodSpec, pobj *corev1.PodSpec)
- func GetClusterByObject(ctx context.Context, cli client.Client, obj client.Object) (*appsv1alpha1.Cluster, error)
- func IsProbeTimeout(probes *appsv1alpha1.ClusterDefinitionProbes, podsReadyTime *metav1.Time) bool
- func NewClusterPlanBuilder(ctx intctrlutil.RequestCtx, cli client.Client) graph.PlanBuilder
- func NewComponentPlanBuilder(ctx intctrlutil.RequestCtx, cli client.Client, req ctrl.Request) graph.PlanBuilder
- func ResolvePodSpecDefaultFields(obj corev1.PodSpec, pobj *corev1.PodSpec)
- func UpdateComponentInfoToPods(ctx context.Context, cli client.Client, cluster *appsv1alpha1.Cluster, ...) error
- func UpdateCustomLabelToPods(ctx context.Context, cli client.Client, cluster *appsv1alpha1.Cluster, ...) error
- func UpdatePodSpecSystemFields(pobj *corev1.PodSpec)
- type BackupPolicyTemplateReconciler
- type ClusterAPINormalizationTransformer
- type ClusterDefinitionReconciler
- type ClusterReconciler
- type ClusterStatusEventHandler
- type ClusterVersionReconciler
- type ComponentClassReconciler
- type ComponentDefinitionReconciler
- type ComponentReconciler
- type OpsRequestReconciler
- type ParallelTransformers
- type ServiceDescriptorReconciler
- type SystemAccountReconciler
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 DelayUpdatePodSpecSystemFields ¶ added in v0.8.0
DelayUpdatePodSpecSystemFields to delay the updating to system fields in pod spec.
func GetClusterByObject ¶ added in v0.8.0
func GetClusterByObject(ctx context.Context, cli client.Client, obj client.Object) (*appsv1alpha1.Cluster, error)
GetClusterByObject gets cluster by related k8s workloads.
func IsProbeTimeout ¶ added in v0.8.0
func IsProbeTimeout(probes *appsv1alpha1.ClusterDefinitionProbes, podsReadyTime *metav1.Time) bool
IsProbeTimeout checks if the application of the pod is probe timed out.
func NewClusterPlanBuilder ¶ added in v0.6.0
func NewClusterPlanBuilder(ctx intctrlutil.RequestCtx, cli client.Client) graph.PlanBuilder
NewClusterPlanBuilder returns a clusterPlanBuilder powered PlanBuilder
func NewComponentPlanBuilder ¶ added in v0.8.0
func NewComponentPlanBuilder(ctx intctrlutil.RequestCtx, cli client.Client, req ctrl.Request) graph.PlanBuilder
NewComponentPlanBuilder returns a componentPlanBuilder powered PlanBuilder
func ResolvePodSpecDefaultFields ¶
ResolvePodSpecDefaultFields set default value for some known fields of proto PodSpec @pobj.
func UpdateComponentInfoToPods ¶ added in v0.8.0
func UpdateComponentInfoToPods( ctx context.Context, cli client.Client, cluster *appsv1alpha1.Cluster, component *intctrlcomp.SynthesizedComponent, dag *graph.DAG) error
UpdateComponentInfoToPods patches current component's replicas to all belonging pods, as an annotation.
func UpdateCustomLabelToPods ¶ added in v0.8.0
func UpdateCustomLabelToPods(ctx context.Context, cli client.Client, cluster *appsv1alpha1.Cluster, component *intctrlcomp.SynthesizedComponent, dag *graph.DAG) error
UpdateCustomLabelToPods updates custom label to pods
func UpdatePodSpecSystemFields ¶ added in v0.8.0
UpdatePodSpecSystemFields to update system fields in pod spec.
Types ¶
type BackupPolicyTemplateReconciler ¶ added in v0.7.0
type BackupPolicyTemplateReconciler struct { client.Client Scheme *k8sruntime.Scheme Recorder record.EventRecorder }
func (*BackupPolicyTemplateReconciler) SetupWithManager ¶ added in v0.7.0
func (r *BackupPolicyTemplateReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type ClusterAPINormalizationTransformer ¶ added in v0.8.0
type ClusterAPINormalizationTransformer struct{}
ClusterAPINormalizationTransformer handles cluster and component API conversion.
func (*ClusterAPINormalizationTransformer) Transform ¶ added in v0.8.0
func (t *ClusterAPINormalizationTransformer) 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 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 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 ComponentDefinitionReconciler ¶ added in v0.8.0
type ComponentDefinitionReconciler struct { client.Client Scheme *runtime.Scheme Recorder record.EventRecorder }
ComponentDefinitionReconciler reconciles a ComponentDefinition object
func (*ComponentDefinitionReconciler) Reconcile ¶ added in v0.8.0
func (r *ComponentDefinitionReconciler) 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 (*ComponentDefinitionReconciler) SetupWithManager ¶ added in v0.8.0
func (r *ComponentDefinitionReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type ComponentReconciler ¶ added in v0.8.0
type ComponentReconciler struct { client.Client Scheme *runtime.Scheme Recorder record.EventRecorder }
ComponentReconciler reconciles a Component object
func (*ComponentReconciler) Reconcile ¶ added in v0.8.0
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 (*ComponentReconciler) SetupWithManager ¶ added in v0.8.0
func (r *ComponentReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
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 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 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.
Source Files ¶
- backuppolicytemplate_controller.go
- 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
- component_controller.go
- component_hscale_volume_populator.go
- component_plan_builder.go
- component_utils.go
- componentdefinition_controller.go
- const.go
- opsrequest_controller.go
- servicedescriptor_controller.go
- systemaccount_controller.go
- systemaccount_util.go
- transform_types.go
- transform_utils.go
- transformer_cluster_api_normalization.go
- transformer_cluster_backup_policy.go
- transformer_cluster_component.go
- transformer_cluster_component_status.go
- transformer_cluster_credential.go
- transformer_cluster_deletion.go
- transformer_cluster_halt_recovering.go
- transformer_cluster_init.go
- transformer_cluster_load_resources.go
- transformer_cluster_meta.go
- transformer_cluster_ownership.go
- transformer_cluster_restore.go
- transformer_cluster_service.go
- transformer_cluster_status.go
- transformer_component_account.go
- transformer_component_account_provision.go
- transformer_component_configuration.go
- transformer_component_credential.go
- transformer_component_custom_volumes.go
- transformer_component_deletion.go
- transformer_component_init.go
- transformer_component_load_resources.go
- transformer_component_meta.go
- transformer_component_ownership.go
- transformer_component_pdb.go
- transformer_component_rbac.go
- transformer_component_service.go
- transformer_component_status.go
- transformer_component_tls.go
- transformer_component_validation.go
- transformer_component_workload.go
- transformer_secret.go
- transformers_parallel.go
- utils.go