From 040d2efe2e1b57dd7509d0264a711ec30634c5c9 Mon Sep 17 00:00:00 2001 From: Cyril Levis Date: Fri, 6 Dec 2024 10:01:13 +0100 Subject: [PATCH] chore: wording --- internal/controller/dragonfly_instance.go | 6 +++--- internal/controller/util.go | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/internal/controller/dragonfly_instance.go b/internal/controller/dragonfly_instance.go index 2142425..671e9f2 100644 --- a/internal/controller/dragonfly_instance.go +++ b/internal/controller/dragonfly_instance.go @@ -303,7 +303,7 @@ func (dfi *DragonflyInstance) checkAndConfigureReplication(ctx context.Context) return err } - // Configure to the right master if not correct + // configuring to the right master if !ok { dfi.log.Info("configuring pod as replica to the right master", "pod", pod.Name) if err := dfi.configureReplica(ctx, &pod); err != nil { @@ -313,7 +313,7 @@ func (dfi *DragonflyInstance) checkAndConfigureReplication(ctx context.Context) } } - dfi.log.Info("All pods are configured correctly", "dfi", dfi.df.Name) + dfi.log.Info("all pods are configured correctly", "dfi", dfi.df.Name) return nil } @@ -365,7 +365,7 @@ func (dfi *DragonflyInstance) replicaOf(ctx context.Context, pod *corev1.Pod, ma } if err := dfi.client.Update(ctx, pod); err != nil { - return fmt.Errorf("could not update replica annotation: %w", err) + return fmt.Errorf("could not update replica metadatas: %w", err) } return nil diff --git a/internal/controller/util.go b/internal/controller/util.go index 69c3374..0bfb977 100644 --- a/internal/controller/util.go +++ b/internal/controller/util.go @@ -113,7 +113,7 @@ func replTakeover(ctx context.Context, c client.Client, newMaster *corev1.Pod) e } func isStableState(ctx context.Context, pod *corev1.Pod) (bool, error) { - // Ensure PodIP and Pod Phase are ready + // wait until pod IP is ready if pod.Status.PodIP == "" || pod.Status.Phase != corev1.PodRunning { return false, nil }