Documentation ¶
Index ¶
- Constants
- func GetContainer(pod *v1.Pod, containerName string) *v1.Container
- type PodOOMRecorderController
- type ResourceRecommendController
- func (r *ResourceRecommendController) CancelTasks(namespacedName k8stypes.NamespacedName) *errortypes.CustomError
- func (r *ResourceRecommendController) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
- func (r *ResourceRecommendController) RegisterTasks(recommendation recommendationtypes.Recommendation) *errortypes.CustomError
- func (r *ResourceRecommendController) SetupWithManager(mgr ctrl.Manager) error
- func (r *ResourceRecommendController) UpdateRecommendationStatus(namespaceName k8stypes.NamespacedName, ...) error
- type ResourceRecommender
Constants ¶
Variables ¶
This section is empty.
Functions ¶
Types ¶
type PodOOMRecorderController ¶
type PodOOMRecorderController struct {
*oom.PodOOMRecorder
}
PodOOMRecorderController reconciles a PodOOMRecorder object
func (*PodOOMRecorderController) Reconcile ¶
func (r *PodOOMRecorderController) 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. reconcile takes an pod resource.It records information when a Pod experiences an OOM (Out of Memory) state. the ResourceRecommend 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.12.2/pkg/reconcile
func (*PodOOMRecorderController) SetupWithManager ¶
func (r *PodOOMRecorderController) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type ResourceRecommendController ¶
type ResourceRecommendController struct { client.Client Scheme *runtime.Scheme ProcessorManager *processormanager.Manager RecommenderManager *recommendermanager.Manager }
ResourceRecommendController reconciles a ResourceRecommend object
func (*ResourceRecommendController) CancelTasks ¶
func (r *ResourceRecommendController) CancelTasks(namespacedName k8stypes.NamespacedName) *errortypes.CustomError
CancelTasks Cancel all process task
func (*ResourceRecommendController) Reconcile ¶
func (r *ResourceRecommendController) 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. compare the state specified by the ResourceRecommend 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.12.2/pkg/reconcile
func (*ResourceRecommendController) RegisterTasks ¶
func (r *ResourceRecommendController) RegisterTasks(recommendation recommendationtypes.Recommendation) *errortypes.CustomError
RegisterTasks Register all process task
func (*ResourceRecommendController) SetupWithManager ¶
func (r *ResourceRecommendController) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
func (*ResourceRecommendController) UpdateRecommendationStatus ¶
func (r *ResourceRecommendController) UpdateRecommendationStatus(namespaceName k8stypes.NamespacedName, recommendation *recommendationtypes.Recommendation) error
type ResourceRecommender ¶
type ResourceRecommender struct {
// contains filtered or unexported fields
}
func NewResourceRecommenderController ¶
func NewResourceRecommenderController(ctx context.Context, genericConf *generic.GenericConfiguration, opts *controller.ResourceRecommenderConfig) (*ResourceRecommender, error)
func (ResourceRecommender) Run ¶
func (r ResourceRecommender) Run()