controller

package
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 28, 2024 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ExponentialFailureRateLimiterBaseDelay = time.Minute
	ExponentialFailureRateLimiterMaxDelay  = 30 * time.Minute
	DefaultRecommendInterval               = 24 * time.Hour
)

Variables

This section is empty.

Functions

func GetContainer

func GetContainer(pod *v1.Pod, containerName string) *v1.Container

Types

type PodOOMRecorderController

type PodOOMRecorderController struct {
	*oom.PodOOMRecorder
}

PodOOMRecorderController reconciles a PodOOMRecorder object

func (*PodOOMRecorderController) 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. 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

CancelTasks Cancel all process task

func (*ResourceRecommendController) 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. 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

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 (ResourceRecommender) Run

func (r ResourceRecommender) Run()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL