clusterautoscaler

package
v1.2.45-rc1 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NoHCPAutoscalerSupportMessage = "Hosted Control Plane clusters do not support cluster-autoscaler configuration"
	ClusterNotReadyMessage        = "Cluster '%s' is not yet ready. Current state is '%s'"
)

Variables

This section is empty.

Functions

func BuildAutoscalerOptions

func BuildAutoscalerOptions(spec *ocm.AutoscalerConfig, prefix string) string

func CreateAutoscalerConfig

func CreateAutoscalerConfig(args *AutoscalerArgs) (*ocm.AutoscalerConfig, error)

func IsAutoscalerSetViaCLI

func IsAutoscalerSetViaCLI(cmd *pflag.FlagSet, prefix string) bool

func IsAutoscalerSupported added in v1.2.38

func IsAutoscalerSupported(runtime *rosa.Runtime, cluster *cmv1.Cluster) error

func PrintAutoscaler added in v1.2.38

func PrintAutoscaler(a *cmv1.ClusterAutoscaler) string

Types

type AutoscalerArgs

type AutoscalerArgs struct {
	BalanceSimilarNodeGroups    bool
	SkipNodesWithLocalStorage   bool
	LogVerbosity                int
	MaxPodGracePeriod           int
	PodPriorityThreshold        int
	IgnoreDaemonsetsUtilization bool
	MaxNodeProvisionTime        string
	BalancingIgnoredLabels      []string
	ResourceLimits              ResourceLimits
	ScaleDown                   ScaleDownConfig
}

func AddClusterAutoscalerFlags

func AddClusterAutoscalerFlags(cmd *cobra.Command, prefix string) *AutoscalerArgs

func GetAutoscalerOptions

func GetAutoscalerOptions(
	cmd *pflag.FlagSet, prefix string, confirmBeforeAllArgs bool, autoscalerArgs *AutoscalerArgs,
) (*AutoscalerArgs, error)

func PrefillAutoscalerArgs added in v1.2.45

func PrefillAutoscalerArgs(cmd *cobra.Command, autoscalerArgs *AutoscalerArgs,
	autoscaler *cmv1.ClusterAutoscaler) (*AutoscalerArgs, error)

PrefillAutoscalerArgs prefill autoscaler args from existing autoscaler in edit flow

type ResourceLimits

type ResourceLimits struct {
	MaxNodesTotal int
	Cores         ResourceRange
	Memory        ResourceRange
	GPULimits     []string
}

type ResourceRange

type ResourceRange struct {
	Min int
	Max int
}

type ScaleDownConfig

type ScaleDownConfig struct {
	Enabled              bool
	UnneededTime         string
	UtilizationThreshold float64
	DelayAfterAdd        string
	DelayAfterDelete     string
	DelayAfterFailure    string
}

Jump to

Keyboard shortcuts

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