hpa

package
v1.20.1 Latest Latest
Warning

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

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

Documentation

Overview

Copyright 2022 The Fission Authors.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

View Source
const (
	DeploymentKind    = "Deployment"
	DeploymentVersion = "apps/v1"
)

Deployment Constants

Variables

This section is empty.

Functions

func ConvertTargetCPUToCustomMetric

func ConvertTargetCPUToCustomMetric(targetCPUVal int32) asv2.MetricSpec

Types

type HpaOperations

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

func NewHpaOperations

func NewHpaOperations(logger *zap.Logger, kubernetesClient kubernetes.Interface, instanceID string) *HpaOperations

func (*HpaOperations) CreateOrGetHpa

func (hpaops *HpaOperations) CreateOrGetHpa(ctx context.Context, hpaName string, execStrategy *fv1.ExecutionStrategy,
	depl *appsv1.Deployment, deployLabels map[string]string, deployAnnotations map[string]string) (*asv2.HorizontalPodAutoscaler, error)

func (*HpaOperations) DeleteHpa

func (hpaops *HpaOperations) DeleteHpa(ctx context.Context, ns string, name string) error

func (*HpaOperations) GetHpa

func (hpaops *HpaOperations) GetHpa(ctx context.Context, ns, name string) (*asv2.HorizontalPodAutoscaler, error)

func (*HpaOperations) UpdateHpa

func (hpaops *HpaOperations) UpdateHpa(ctx context.Context, hpa *asv2.HorizontalPodAutoscaler) error

Jump to

Keyboard shortcuts

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