boost

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package boost contains logic for managing startup resource boosts

Index

Constants

View Source
const (
	DefaultManagerCheckInterval     = time.Duration(5 * time.Second)
	StartupCPUBoostPodLabelKey      = "autoscaling.stefaniak.dev/startup-cpu-boost"
	StartupCPUBoostPodAnnotationKey = "autoscaling.stefaniak.dev/startup-cpu-boost"
)

Variables

This section is empty.

Functions

func NewStartupCPUBoostPod

func NewStartupCPUBoostPod(pod *corev1.Pod) (*startupCPUBoostPod, error)

Types

type Manager

type Manager interface {
	AddStartupCPUBoost(ctx context.Context, boost *autoscaling.StartupCPUBoost) error
	DeleteStartupCPUBoost(boost *autoscaling.StartupCPUBoost)
	GetStartupCPUBoostForPod(pod *corev1.Pod) (*startupCPUBoost, bool)
	GetStartupCPUBoost(namespace string, name string) (*startupCPUBoost, bool)
	Start(ctx context.Context) error
}

func NewManager

func NewManager(client client.Client) Manager

type StartupCPUBoostPodAnnotation

type StartupCPUBoostPodAnnotation struct {
	BoostTimestamp  *time.Time        `json:"timestamp,omitempty"`
	InitCPURequests map[string]string `json:"initCPURequests,omitempty"`
	InitCPULimits   map[string]string `json:"initCPULimits,omitempty"`
}

func NewStartupCPUBoostPodAnnotation

func NewStartupCPUBoostPodAnnotation(timestamp *time.Time) *StartupCPUBoostPodAnnotation

func (StartupCPUBoostPodAnnotation) MustMarshalToJSON

func (a StartupCPUBoostPodAnnotation) MustMarshalToJSON() string

Jump to

Keyboard shortcuts

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