Change:
The statefulset controller and controller history implementations should be migrated off of the Apps client (deprecated) and onto the AppsV1BetaClient. Currently there is no user facing issue caused by the use of the deprecated resource, but we should maintain good code hygiene.
There are no sig labels on this issue. Please by:<br(1) mentioning a sig: <br(2) specifying the label manually: <br<brNote: method (1) will trigger a notification to the team. You can find the team list .
/assign kow3ns
/assign kow3ns
/cc
/assign

Discussion:
} // Update the revisions name and labels clone.Name = ControllerRevisionName(parent.GetName(), hash) <del> created, err := rh.client.Apps().ControllerRevisions(parent.GetNamespace()).Create(clone) </del> <ins> created, err := rh.client.AppsV1beta1().ControllerRevisions(parent.GetNamespace()).Create(clone) </ins> if errors.IsAlreadyExists(err) { probe++ continue

return nil } clone.Revision = newRevision <del> updated, updateErr := rh.client.Apps().ControllerRevisions(clone.Namespace).Update(clone) </del> <ins> updated, updateErr := rh.client.AppsV1beta1().ControllerRevisions(clone.Namespace).Update(clone) </ins> if updateErr == nil { return nil }

} func (rh *realHistory) DeleteControllerRevision(revision *apps.ControllerRevision) error { <del> return rh.client.Apps().ControllerRevisions(revision.Namespace).Delete(revision.Name, nil) </del> <ins> return rh.client.AppsV1beta1().ControllerRevisions(revision.Namespace).Delete(revision.Name, nil) </ins> } func (rh *realHistory) AdoptControllerRevision(parent metav1.Object, parentKind schema.GroupVersionKind, revision *apps.ControllerRevision) (*apps.ControllerRevision, error) {

return nil, fmt.Errorf("attempt to adopt revision owned by %v", owner) } // Use strategic merge patch to add an owner reference indicating a controller ref <del> return rh.client.Apps().ControllerRevisions(parent.GetNamespace()).Patch(revision.GetName(), </del> <ins> return rh.client.AppsV1beta1().ControllerRevisions(parent.GetNamespace()).Patch(revision.GetName(), </ins> types.StrategicMergePatchType, []byte(fmt.Sprintf( `{"metadata":{"ownerReferences":[{"apiVersion":"%s","kind":"%s","name":"%s","uid":"%s","controller":true,"blockOwnerDeletion":true}],"uid":"%s"}}`, parentKind.GroupVersion().String(), parentKind.Kind,

func (rh *realHistory) ReleaseControllerRevision(parent metav1.Object, revision *apps.ControllerRevision) (*apps.ControllerRevision, error) { // Use strategic merge patch to add an owner reference indicating a controller ref <del> released, err := rh.client.Apps().ControllerRevisions(revision.GetNamespace()).Patch(revision.GetName(), </del> <ins> released, err := rh.client.AppsV1beta1().ControllerRevisions(revision.GetNamespace()).Patch(revision.GetName(), </ins> types.StrategicMergePatchType, []byte(fmt.Sprintf(`{"metadata":{"ownerReferences":[{"$patch":"delete","uid":"%s"}],"uid":"%s"}}`, parent.GetUID(), revision.UID)))

// don't wait due to limited number of clients, but backoff after the default number of steps return retry.RetryOnConflict(retry.DefaultRetry, func() error { set.Status = *status <del> _, updateErr := ssu.client.Apps().StatefulSets(set.Namespace).UpdateStatus(set) </del> <ins> _, updateErr := ssu.client.AppsV1beta1().StatefulSets(set.Namespace).UpdateStatus(set) </ins> if updateErr == nil { return nil }