Documentation
¶
Index ¶
- Constants
- type DeploymentToPDBReconciler
- type DeploymentWrapper
- func (d *DeploymentWrapper) AddAnnotation(status, newReplicas string)
- func (d *DeploymentWrapper) GetMaxSurge() intstr.IntOrString
- func (d *DeploymentWrapper) GetReplicas() int32
- func (d *DeploymentWrapper) Obj() client.Object
- func (d *DeploymentWrapper) RemoveAnnotation(status string)
- func (d *DeploymentWrapper) SetReplicas(replicas int32)
- type EvictionAutoScalerReconciler
- type NodeReconciler
- type PDBToEvictionAutoScalerReconciler
- type StatefulSetWrapper
- func (s *StatefulSetWrapper) AddAnnotation(status, newReplicas string)
- func (s *StatefulSetWrapper) GetMaxSurge() intstr.IntOrString
- func (s *StatefulSetWrapper) GetReplicas() int32
- func (s *StatefulSetWrapper) Obj() client.Object
- func (s *StatefulSetWrapper) RemoveAnnotation(status string)
- func (s *StatefulSetWrapper) SetReplicas(replicas int32)
- type Surger
Constants ¶
const EvictionSurgeReplicasAnnotationKey = "evictionSurgeReplicas"
const NodeNameIndex = "spec.nodeName"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DeploymentToPDBReconciler ¶
type DeploymentToPDBReconciler struct { client.Client Scheme *runtime.Scheme Recorder record.EventRecorder }
DeploymentToPDBReconciler reconciles a Deployment object and ensures an associated PDB is created and deleted
func (*DeploymentToPDBReconciler) Reconcile ¶
func (r *DeploymentToPDBReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile watches for Deployment changes (created, updated, deleted) and creates or deletes the associated PDB. creates pdb with minAvailable to be same as replicas for any deployment
func (*DeploymentToPDBReconciler) SetupWithManager ¶
func (r *DeploymentToPDBReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type DeploymentWrapper ¶
type DeploymentWrapper struct {
// contains filtered or unexported fields
}
func (*DeploymentWrapper) AddAnnotation ¶
func (d *DeploymentWrapper) AddAnnotation(status, newReplicas string)
AddAnnotation add new status annotation
func (*DeploymentWrapper) GetMaxSurge ¶
func (d *DeploymentWrapper) GetMaxSurge() intstr.IntOrString
func (*DeploymentWrapper) GetReplicas ¶
func (d *DeploymentWrapper) GetReplicas() int32
func (*DeploymentWrapper) Obj ¶
func (d *DeploymentWrapper) Obj() client.Object
func (*DeploymentWrapper) RemoveAnnotation ¶
func (d *DeploymentWrapper) RemoveAnnotation(status string)
RemoveAnnotation will delete specific status annotation
func (*DeploymentWrapper) SetReplicas ¶
func (d *DeploymentWrapper) SetReplicas(replicas int32)
type EvictionAutoScalerReconciler ¶
type EvictionAutoScalerReconciler struct { client.Client Scheme *runtime.Scheme Recorder record.EventRecorder }
EvictionAutoScalerReconciler reconciles a EvictionAutoScaler object
func (*EvictionAutoScalerReconciler) SetupWithManager ¶
func (r *EvictionAutoScalerReconciler) SetupWithManager(mgr ctrl.Manager) error
type NodeReconciler ¶
EvictionAutoScalerReconciler reconciles a EvictionAutoScaler object
func (*NodeReconciler) Reconcile ¶
Reconcile is the main loop of the controller. It will look for unschedulded nodes and for every pod on the node
func (*NodeReconciler) SetupWithManager ¶
func (r *NodeReconciler) SetupWithManager(mgr ctrl.Manager) error
type PDBToEvictionAutoScalerReconciler ¶
type PDBToEvictionAutoScalerReconciler struct { client.Client Scheme *runtime.Scheme Recorder record.EventRecorder }
PDBToEvictionAutoScalerReconciler reconciles a PodDisruptionBudget object.
func (*PDBToEvictionAutoScalerReconciler) Reconcile ¶
func (r *PDBToEvictionAutoScalerReconciler) Reconcile(ctx context.Context, req reconcile.Request) (reconcile.Result, error)
Reconcile reads the state of the cluster for a PDB and creates/deletes EvictionAutoScalers accordingly.
func (*PDBToEvictionAutoScalerReconciler) SetupWithManager ¶
func (r *PDBToEvictionAutoScalerReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type StatefulSetWrapper ¶
type StatefulSetWrapper struct {
// contains filtered or unexported fields
}
func (*StatefulSetWrapper) AddAnnotation ¶
func (s *StatefulSetWrapper) AddAnnotation(status, newReplicas string)
AddAnnotation will reset and add new annotation map every time this func is called
func (*StatefulSetWrapper) GetMaxSurge ¶
func (s *StatefulSetWrapper) GetMaxSurge() intstr.IntOrString
func (*StatefulSetWrapper) GetReplicas ¶
func (s *StatefulSetWrapper) GetReplicas() int32
func (*StatefulSetWrapper) Obj ¶
func (s *StatefulSetWrapper) Obj() client.Object
func (*StatefulSetWrapper) RemoveAnnotation ¶
func (s *StatefulSetWrapper) RemoveAnnotation(status string)
RemoveAnnotation will delete specific status annotation
func (*StatefulSetWrapper) SetReplicas ¶
func (s *StatefulSetWrapper) SetReplicas(replicas int32)