Update adoption/release of DaemonSet controller history
This commit is contained in:
@@ -401,6 +401,26 @@ func (r RealRSControl) PatchReplicaSet(namespace, name string, data []byte) erro
|
||||
return err
|
||||
}
|
||||
|
||||
// TODO: merge the controller revision interface in controller_history.go with this one
|
||||
// ControllerRevisionControlInterface is an interface that knows how to patch
|
||||
// ControllerRevisions, as well as increment or decrement them. It is used
|
||||
// by the daemonset controller to ease testing of actions that it takes.
|
||||
type ControllerRevisionControlInterface interface {
|
||||
PatchControllerRevision(namespace, name string, data []byte) error
|
||||
}
|
||||
|
||||
// RealControllerRevisionControl is the default implementation of ControllerRevisionControlInterface.
|
||||
type RealControllerRevisionControl struct {
|
||||
KubeClient clientset.Interface
|
||||
}
|
||||
|
||||
var _ ControllerRevisionControlInterface = &RealControllerRevisionControl{}
|
||||
|
||||
func (r RealControllerRevisionControl) PatchControllerRevision(namespace, name string, data []byte) error {
|
||||
_, err := r.KubeClient.AppsV1beta1().ControllerRevisions(namespace).Patch(name, types.StrategicMergePatchType, data)
|
||||
return err
|
||||
}
|
||||
|
||||
// PodControlInterface is an interface that knows how to add or delete pods
|
||||
// created as an interface to allow testing.
|
||||
type PodControlInterface interface {
|
||||
|
Reference in New Issue
Block a user