scaling

package
v0.0.0-...-677afd8 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2019 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ReplicaCounts

type ReplicaCounts struct {
	DesiredReplicas int32 `json:"desiredReplicas"`
	ActualReplicas  int32 `json:"actualReplicas"`
}

ReplicaCounts provide the desired and actual number of replicas.

func GetScaleSpec

func GetScaleSpec(cfg *rest.Config, kind, namespace, name string) (*ReplicaCounts, error)

GetScaleSpec returns a populated ReplicaCounts object with desired and actual number of replicas.

func ScaleResource

func ScaleResource(cfg *rest.Config, kind, namespace, name, count string) (*ReplicaCounts, error)

ScaleResource scales the provided resource using the client scale method in the case of Deployment, ReplicaSet, Replication Controller. In the case of a job we are using the jobs resource update method since the client scale method does not provide one for the job.

Jump to

Keyboard shortcuts

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