Skip to content
This repository was archived by the owner on Feb 28, 2024. It is now read-only.

Commit a001215

Browse files
committed
Migrate to new controller-runtime wait
1 parent 4b1aa3a commit a001215

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ func previousPodName(mariadb *mariadbv1alpha1.MariaDB, podIndex int) (string, er
163163

164164
func waitForPodReady(ctx context.Context, mariadb *mariadbv1alpha1.MariaDB, name string, clientset *kubernetes.Clientset,
165165
logger logr.Logger) error {
166-
return wait.PollImmediateUntilWithContext(ctx, 1*time.Second, func(context.Context) (bool, error) {
166+
return wait.PollUntilContextCancel(ctx, 1*time.Second, true, func(context.Context) (bool, error) {
167167
pod, err := clientset.CoreV1().Pods(mariadb.Namespace).Get(ctx, name, metav1.GetOptions{})
168168
if err != nil {
169169
logger.V(1).Info("Error getting Pod", "err", err)

0 commit comments

Comments
 (0)