Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewComponentByType ¶
func NewComponentByType( cli client.Client, cluster *appsv1alpha1.Cluster, component *appsv1alpha1.ClusterComponentSpec, componentDef appsv1alpha1.ClusterComponentDefinition, ) (types.Component, error)
NewComponentByType creates a component object.
Types ¶
type ComponentStatusSynchronizer ¶
type ComponentStatusSynchronizer struct {
// contains filtered or unexported fields
}
ComponentStatusSynchronizer gathers running status from Cluster, component's Workload and Pod objects, then fills status of component (e.g. abnormalities or failures) into the Cluster.Status.Components map.
Although it works to use warning event to determine whether the component is abnormal or failed. In some conditions, the warning events are possible to be throttled and dropped due to K8s event rate control. For example, after the kubelet fails to pull the image, it will put the image into the backoff cache and send the BackOff (Normal) event. If it has already consumed the 25 burst quota to send event, event can only be sent in the rate of once per 300s, in this way, the subsequent warning events of ImagePullError would be dropped.
type DeploymentReconciler ¶
type DeploymentReconciler struct { client.Client Scheme *runtime.Scheme Recorder record.EventRecorder }
DeploymentReconciler reconciles a deployment object
func (*DeploymentReconciler) Reconcile ¶
func (r *DeploymentReconciler) 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 (*DeploymentReconciler) SetupWithManager ¶
func (r *DeploymentReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type StatefulSetReconciler ¶
type StatefulSetReconciler struct { client.Client Scheme *runtime.Scheme Recorder record.EventRecorder }
StatefulSetReconciler reconciles a statefulset object
func (*StatefulSetReconciler) Reconcile ¶
func (r *StatefulSetReconciler) 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 (*StatefulSetReconciler) SetupWithManager ¶
func (r *StatefulSetReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.