Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AnnotationFunc ¶
type ScaleAnnotater ¶
type ScaleAnnotater struct { ChangeAnnotations AnnotationFunc // contains filtered or unexported fields }
func NewScaleAnnotater ¶
func NewScaleAnnotater(scales kextensionsclient.ScalesGetter, dcs appsclient.DeploymentConfigsGetter, rcs kcoreclient.ReplicationControllersGetter, changeAnnots AnnotationFunc) *ScaleAnnotater
func (*ScaleAnnotater) GetObjectWithScale ¶
func (c *ScaleAnnotater) GetObjectWithScale(namespace string, ref unidlingapi.CrossGroupObjectReference) (runtime.Object, *kextapi.Scale, error)
getObjectWithScale either fetches a known type of object and constructs a Scale from that, or uses the scale subresource to fetch a Scale by itself.
func (*ScaleAnnotater) UpdateObjectScale ¶
func (c *ScaleAnnotater) UpdateObjectScale(updater ScaleUpdater, namespace string, ref unidlingapi.CrossGroupObjectReference, obj runtime.Object, scale *kextapi.Scale) error
updateObjectScale updates the scale of an object and removes unidling annotations for objects of a know type. For objects of an unknown type, it scales the object using the scale subresource (and does not change annotations).
type ScaleUpdater ¶
ScaleUpdater implements a method "Update" that knows how to update a given object
func NewScaleUpdater ¶
func NewScaleUpdater(encoder runtime.Encoder, namespace string, dcGetter appsclient.DeploymentConfigsGetter, rcGetter kcoreclient.ReplicationControllersGetter) ScaleUpdater
Click to show internal directories.
Click to hide internal directories.