Skip to content

Commit

Permalink
chore: wording
Browse files Browse the repository at this point in the history
  • Loading branch information
cyrinux committed Dec 6, 2024
1 parent cf485c9 commit 040d2ef
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions internal/controller/dragonfly_instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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
}

Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion internal/controller/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 040d2ef

Please sign in to comment.