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
- func ConvertTargetCPUToCustomMetric(targetCPUVal int32) asv2.MetricSpec
- type HpaOperations
- func (hpaops *HpaOperations) CreateOrGetHpa(ctx context.Context, fn *fv1.Function, hpaName string, ...) (*asv2.HorizontalPodAutoscaler, error)
- func (hpaops *HpaOperations) DeleteHpa(ctx context.Context, ns string, name string) error
- func (hpaops *HpaOperations) GetHpa(ctx context.Context, ns, name string) (*asv2.HorizontalPodAutoscaler, error)
- func (hpaops *HpaOperations) UpdateHpa(ctx context.Context, hpa *asv2.HorizontalPodAutoscaler) error
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, fn *fv1.Function, hpaName string, execStrategy *fv1.ExecutionStrategy, depl *appsv1.Deployment, deployLabels map[string]string, deployAnnotations map[string]string) (*asv2.HorizontalPodAutoscaler, 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
Click to show internal directories.
Click to hide internal directories.