controllers

package
v1.2.3 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2024 License: MIT Imports: 28 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DaemonSetStr   string = "DaemonSet"
	StatefulSetStr string = "StatefulSet"
	DeploymentStr  string = "Deployment"

	MainContainerAnnotationKey    string = "vpa-butler.cloud.sap/main-container"
	UpdateModeAnnotationKey       string = "vpa-butler.cloud.sap/update-mode"
	ControlledValuesAnnotationKey string = "vpa-butler.cloud.sap/controlled-values"
)

Variables

This section is empty.

Functions

func SetupForAppsV1

func SetupForAppsV1(mgr ctrl.Manager) error

Types

type GenericController

type GenericController struct {
	client.Client

	Log    logr.Logger
	Scheme *runtime.Scheme
	// contains filtered or unexported fields
}

func (*GenericController) Reconcile

func (v *GenericController) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

func (*GenericController) SetupWithManager

func (v *GenericController) SetupWithManager(mgr ctrl.Manager, instance client.Object) error

type VpaController

type VpaController struct {
	client.Client
	Log              logr.Logger
	Scheme           *runtime.Scheme
	MinAllowedCPU    resource.Quantity
	MinAllowedMemory resource.Quantity
	Version          string
}

func (*VpaController) Reconcile

func (v *VpaController) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

func (*VpaController) SetupWithManager

func (v *VpaController) SetupWithManager(mgr ctrl.Manager) error

type VpaRunnable

type VpaRunnable struct {
	client.Client
	Period          time.Duration
	JitterFactor    float64
	CapacityPercent int64
	Log             logr.Logger
}

VpaRunnable is responsible for setting the maximum allowed resources of a served Vpa. As all served Vpas have to evaluated against all nodes we fetch the Vpas, their target and the nodes only once.

func (*VpaRunnable) Start

func (v *VpaRunnable) Start(ctx context.Context) error

Jump to

Keyboard shortcuts

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