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.