advisor

package
v0.5.0-tke.1 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2022 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultNamespace = "default"
)

Variables

This section is empty.

Functions

func GetTargetLabelSelector added in v0.3.0

func GetTargetLabelSelector(target *corev1.ObjectReference, scale *v1.Scale, ds *appsv1.DaemonSet) (labels.Selector, error)

func ResourceToContainerMetricNamer added in v0.3.0

func ResourceToContainerMetricNamer(namespace, apiVersion, workloadKind, workloadName, containerName string, resourceName corev1.ResourceName, caller string) metricnaming.MetricNamer

func ResourceToWorkloadMetricNamer added in v0.3.0

func ResourceToWorkloadMetricNamer(target *corev1.ObjectReference, resourceName *corev1.ResourceName, workloadLabelSelector labels.Selector, caller string) metricnaming.MetricNamer

Types

type Advisor

type Advisor interface {
	// Name return name for current Interface
	Name() string

	// Advise analysis and give advice in ProposedRecommendation
	Advise(proposed *types.ProposedRecommendation) error
}

func NewAdvisors

func NewAdvisors(ctx *types.Context) (advisors []Advisor)

type ReplicasAdvisor added in v0.5.0

type ReplicasAdvisor struct {
	*types.Context
}

func (*ReplicasAdvisor) Advise added in v0.5.0

func (a *ReplicasAdvisor) Advise(proposed *types.ProposedRecommendation) error

func (*ReplicasAdvisor) Name added in v0.5.0

func (a *ReplicasAdvisor) Name() string

type ResourceRequestAdvisor

type ResourceRequestAdvisor struct {
	*types.Context
}

func (*ResourceRequestAdvisor) Advise

func (*ResourceRequestAdvisor) Name

func (a *ResourceRequestAdvisor) Name() string

Jump to

Keyboard shortcuts

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