types

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2023 License: Apache-2.0, BSD-2-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ContainerRecommendation added in v0.2.0

type ContainerRecommendation struct {
	ContainerName string       `json:"containerName,omitempty"`
	Target        ResourceList `json:"target,omitempty"`
}

type Context

type Context struct {
	ConfigProperties map[string]string
	PredictorMgr     predictormgr.Manager
	DataSource       providers.History
	Recommendation   *analysisapi.Recommendation
	Scale            *autoscalingapiv1.Scale
	RestMapping      *meta.RESTMapping
	DaemonSet        *appsv1.DaemonSet
	Pods             []corev1.Pod
	PodTemplate      *corev1.PodTemplateSpec
	HPA              *autoscalingv2.HorizontalPodAutoscaler
	ReadyPodNumber   int
}

Context includes all resource used in recommendation progress

type EffectiveHorizontalPodAutoscalerRecommendation added in v0.2.0

type EffectiveHorizontalPodAutoscalerRecommendation struct {
	MinReplicas *int32                     `json:"minReplicas,omitempty"`
	MaxReplicas *int32                     `json:"maxReplicas,omitempty"`
	Metrics     []autoscalingv2.MetricSpec `json:"metrics,omitempty"`
	Prediction  *autoscalingapi.Prediction `json:"prediction,omitempty"`
}

type ProposedRecommendation

type ProposedRecommendation struct {
	// EffectiveHPA is the proposed recommendation for type Replicas
	EffectiveHPA *EffectiveHorizontalPodAutoscalerRecommendation `json:"effectiveHPA,omitempty"`

	// ReplicasRecommendation is the proposed replicas for type Replicas
	ReplicasRecommendation *ReplicasRecommendation `json:"replicasRecommendation,omitempty"`

	// ResourceRequest is the proposed recommendation for type Resource
	ResourceRequest *ResourceRequestRecommendation `json:"resourceRequest,omitempty"`
}

ProposedRecommendation is the result for one recommendation

type ReplicasRecommendation added in v0.5.0

type ReplicasRecommendation struct {
	Replicas *int32 `json:"replicas,omitempty"`
}

type ResourceList added in v0.2.0

type ResourceList map[corev1.ResourceName]string

type ResourceRequestRecommendation added in v0.2.0

type ResourceRequestRecommendation struct {
	Containers []ContainerRecommendation `json:"containers,omitempty"`
}

Jump to

Keyboard shortcuts

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