Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PatchReplicasToScale ¶
func PatchReplicasToScale( ctx context.Context, name string, scale int32, patcher ScalePatcher) error
PatchReplicasToScale patches the provided object name with the expected scale. If the operation fails an error is returned
Types ¶
type ScalePatcher ¶
type ScalePatcher interface { // Patch patches the supplied object name with a supplied patch operation. // The returned scale is provided if the operation completes successfully. Patch(context.Context, string, types.PatchType, []byte, meta.PatchOptions, ...string) (int32, error) }
ScalePatcher provides a generic interface for patching replicas count on common Kubernetes objects. The Kubernetes objects must support patching of spec.replicas to work with this interface
func DeploymentScalePatcher ¶
func DeploymentScalePatcher(deploy apps.DeploymentInterface) ScalePatcher
DeploymentScalePatcher returns a ScalePatcher suitable for use with Deployments
func StatefulSetScalePatcher ¶
func StatefulSetScalePatcher(stateSet apps.StatefulSetInterface) ScalePatcher
StatefulSetScalePatcher returns a ScalePatcher suitable for use with Statefulsets.
Click to show internal directories.
Click to hide internal directories.