scaling

package
v0.0.0-...-8a48855 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2020 License: Apache-2.0 Imports: 12 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 GetReplicaCounts

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

GetReplicaCounts 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