generated: run refactor

This commit is contained in:
Mike Danese
2020-02-07 18:16:47 -08:00
parent 7e88d8db66
commit 3aa59f7f30
697 changed files with 4380 additions and 3806 deletions

View File

@@ -17,6 +17,7 @@ limitations under the License.
package endpoint
import (
"context"
"fmt"
"reflect"
"strconv"
@@ -368,7 +369,7 @@ func (e *EndpointController) syncService(key string) error {
// service is deleted. However, if we're down at the time when
// the service is deleted, we will miss that deletion, so this
// doesn't completely solve the problem. See #6877.
err = e.client.CoreV1().Endpoints(namespace).Delete(name, nil)
err = e.client.CoreV1().Endpoints(namespace).Delete(context.TODO(), name, nil)
if err != nil && !errors.IsNotFound(err) {
return err
}
@@ -512,10 +513,10 @@ func (e *EndpointController) syncService(key string) error {
klog.V(4).Infof("Update endpoints for %v/%v, ready: %d not ready: %d", service.Namespace, service.Name, totalReadyEps, totalNotReadyEps)
if createEndpoints {
// No previous endpoints, create them
_, err = e.client.CoreV1().Endpoints(service.Namespace).Create(newEndpoints)
_, err = e.client.CoreV1().Endpoints(service.Namespace).Create(context.TODO(), newEndpoints)
} else {
// Pre-existing
_, err = e.client.CoreV1().Endpoints(service.Namespace).Update(newEndpoints)
_, err = e.client.CoreV1().Endpoints(service.Namespace).Update(context.TODO(), newEndpoints)
}
if err != nil {
if createEndpoints && errors.IsForbidden(err) {