scaling

package
v1.8.1 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2017 License: Apache-2.0 Imports: 4 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(client client.Interface, kind, namespace, name string) (rc *ReplicaCounts, err error)

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

func ScaleResource

func ScaleResource(client client.Interface, kind, namespace, name, count string) (rc *ReplicaCounts, err 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