autoscaler

package
v0.0.0-...-2dbac4b Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AutoscalerClient

type AutoscalerClient interface {
	CreateOrUpdateAutoscaler(ctx context.Context, workload client.Object, labels map[string]string, max int32, min int32, targetCPUUtilization int32) (string, error)
	DeleteAutoscaler(ctx context.Context, obj client.Object) error
	GetType() client.Object
	GetList(ctx context.Context, labelSelector labels.Selector, namespace string, fieldSelector fields.Selector) ([]client.Object, error)
	GetMaxReplicaCount(obj client.Object) int32
	GetScaleTargetName(obj client.Object) string
	GetName() string
}

type HPAClient

type HPAClient struct {
	// contains filtered or unexported fields
}

func NewHPAClient

func NewHPAClient(k8sClient client.Client) *HPAClient

func (*HPAClient) CreateOrUpdateAutoscaler

func (hc *HPAClient) CreateOrUpdateAutoscaler(ctx context.Context, workload client.Object, labels map[string]string,
	max int32, min int32, targetCPUUtilization int32) (string, error)

func (*HPAClient) DeleteAutoscaler

func (hc *HPAClient) DeleteAutoscaler(ctx context.Context, obj client.Object) error

func (*HPAClient) GetList

func (hc *HPAClient) GetList(ctx context.Context, labelSelector labels.Selector, namespace string, fieldSelector fields.Selector) ([]client.Object, error)

func (*HPAClient) GetMaxReplicaCount

func (hc *HPAClient) GetMaxReplicaCount(obj client.Object) int32

func (*HPAClient) GetName

func (hc *HPAClient) GetName() string

func (*HPAClient) GetScaleTargetName

func (hc *HPAClient) GetScaleTargetName(obj client.Object) string

func (*HPAClient) GetType

func (hc *HPAClient) GetType() client.Object

type HPAClientV2

type HPAClientV2 struct {
	// contains filtered or unexported fields
}

func NewHPAClientV2

func NewHPAClientV2(k8sClient client.Client) *HPAClientV2

func (*HPAClientV2) CreateOrUpdateAutoscaler

func (hc *HPAClientV2) CreateOrUpdateAutoscaler(ctx context.Context, workload client.Object, labels map[string]string,
	max int32, min int32, targetCPUUtilization int32) (string, error)

func (*HPAClientV2) DeleteAutoscaler

func (hc *HPAClientV2) DeleteAutoscaler(ctx context.Context, obj client.Object) error

func (*HPAClientV2) GetList

func (hc *HPAClientV2) GetList(ctx context.Context, labelSelector labels.Selector, namespace string, fieldSelector fields.Selector) ([]client.Object, error)

func (*HPAClientV2) GetMaxReplicaCount

func (hc *HPAClientV2) GetMaxReplicaCount(obj client.Object) int32

func (*HPAClientV2) GetName

func (hc *HPAClientV2) GetName() string

func (*HPAClientV2) GetScaleTargetName

func (hc *HPAClientV2) GetScaleTargetName(obj client.Object) string

func (*HPAClientV2) GetType

func (hc *HPAClientV2) GetType() client.Object

type ScaledobjectClient

type ScaledobjectClient struct {
	// contains filtered or unexported fields
}

func NewScaledobjectClient

func NewScaledobjectClient(k8sClient client.Client, enableEventAutoscaler *bool) *ScaledobjectClient

func (*ScaledobjectClient) CreateOrUpdateAutoscaler

func (soc *ScaledobjectClient) CreateOrUpdateAutoscaler(ctx context.Context, workload client.Object, labels map[string]string,
	max int32, min int32, targetCPUUtilization int32) (string, error)

func (*ScaledobjectClient) DeleteAutoscaler

func (soc *ScaledobjectClient) DeleteAutoscaler(ctx context.Context, obj client.Object) error

func (*ScaledobjectClient) GetList

func (soc *ScaledobjectClient) GetList(ctx context.Context, labelSelector labels.Selector, namespace string, fieldSelector fields.Selector) ([]client.Object, error)

func (*ScaledobjectClient) GetMaxReplicaCount

func (soc *ScaledobjectClient) GetMaxReplicaCount(obj client.Object) int32

func (*ScaledobjectClient) GetName

func (soc *ScaledobjectClient) GetName() string

func (*ScaledobjectClient) GetScaleTargetName

func (soc *ScaledobjectClient) GetScaleTargetName(obj client.Object) string

func (*ScaledobjectClient) GetType

func (soc *ScaledobjectClient) GetType() client.Object

Jump to

Keyboard shortcuts

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