Skip to content

Commit

Permalink
Update to new k8s.io/apimachinery
Browse files Browse the repository at this point in the history
ExponentialBackoffWithContext now requires a func with a context argument.
  • Loading branch information
jsafrane committed May 10, 2023
1 parent 24da2e9 commit bc83030
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/efscreate/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ func getInfra(ctx context.Context, infraClient *configclient.Clientset) (infra *
Factor: operationBackoffFactor,
Steps: operationRetryCount,
}
err = wait.ExponentialBackoffWithContext(ctx, backoff, func() (bool, error) {
err = wait.ExponentialBackoffWithContext(ctx, backoff, func(ctx context.Context) (bool, error) {
var apiError error
infra, apiError = infraClient.ConfigV1().Infrastructures().Get(ctx, infraGlobalName, metav1.GetOptions{})
if apiError != nil {
Expand All @@ -105,7 +105,7 @@ func getSecret(ctx context.Context, client *kubeclient.Clientset) (*corev1.Secre
Steps: operationRetryCount,
}
var awsCreds *corev1.Secret
err := wait.ExponentialBackoffWithContext(ctx, backoff, func() (bool, error) {
err := wait.ExponentialBackoffWithContext(ctx, backoff, func(ctx context.Context) (bool, error) {
var apiError error
awsCreds, apiError = client.CoreV1().Secrets(secretNamespace).Get(ctx, secretName, metav1.GetOptions{})
if apiError != nil {
Expand All @@ -127,7 +127,7 @@ func getNodes(ctx context.Context, client *kubeclient.Clientset) (*corev1.NodeLi
Steps: operationRetryCount,
}
var nodes *corev1.NodeList
err := wait.ExponentialBackoffWithContext(ctx, backoff, func() (bool, error) {
err := wait.ExponentialBackoffWithContext(ctx, backoff, func(ctx context.Context) (bool, error) {
var apiError error
nodes, apiError = client.CoreV1().Nodes().List(ctx, metav1.ListOptions{})
if apiError != nil {
Expand Down

0 comments on commit bc83030

Please sign in to comment.