Skip to content

Commit

Permalink
Correct the event message for process group removal
Browse files Browse the repository at this point in the history
  • Loading branch information
johscheuer committed Apr 15, 2024
1 parent b62be51 commit b262c01
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion controllers/remove_process_groups.go
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,12 @@ func (r *FoundationDBClusterReconciler) getProcessGroupsToRemove(logger logr.Log
}

func (r *FoundationDBClusterReconciler) removeProcessGroups(ctx context.Context, logger logr.Logger, cluster *fdbv1beta2.FoundationDBCluster, processGroupsToRemove []*fdbv1beta2.ProcessGroupStatus, terminatingProcessGroups []*fdbv1beta2.ProcessGroupStatus) map[fdbv1beta2.ProcessGroupID]bool {
r.Recorder.Event(cluster, corev1.EventTypeNormal, "RemovingProcesses", fmt.Sprintf("Removing pods: %v", processGroupsToRemove))
processGroupNames := make([]fdbv1beta2.ProcessGroupID, len(processGroupsToRemove))
for i, processGroup := range processGroupsToRemove {
processGroupNames[i] = processGroup.ProcessGroupID
}

r.Recorder.Event(cluster, corev1.EventTypeNormal, "RemovingProcesses", fmt.Sprintf("Removing process groups: %v", processGroupNames))

processGroups := append(processGroupsToRemove, terminatingProcessGroups...)
for _, processGroup := range processGroups {
Expand Down

0 comments on commit b262c01

Please sign in to comment.