Skip to content

Commit

Permalink
upgrade path changed
Browse files Browse the repository at this point in the history
Signed-off-by: Vivek Reddy <[email protected]>
  • Loading branch information
Vivek Reddy committed Jul 10, 2024
1 parent 9844246 commit d6e73ef
Showing 1 changed file with 0 additions and 34 deletions.
34 changes: 0 additions & 34 deletions pkg/splunk/enterprise/upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,40 +160,6 @@ MonitoringConsole:
}
return true, nil
} else {

// check if a MonitoringConsole is attached to the instance
monitoringConsoleRef := spec.MonitoringConsoleRef
if monitoringConsoleRef.Name == "" {
goto SearchHeadCluster
}

namespacedName := types.NamespacedName{Namespace: cr.GetNamespace(), Name: monitoringConsoleRef.Name}
monitoringConsole := &enterpriseApi.MonitoringConsole{}

// get the monitoring console referred in custom resource
err := c.Get(ctx, namespacedName, monitoringConsole)
if err != nil {
if k8serrors.IsNotFound(err) {
goto SearchHeadCluster
}
eventPublisher.Warning(ctx, "UpgradePathValidation", fmt.Sprintf("Could not find the Monitoring Console. Reason %v", err))
scopedLog.Error(err, "Unable to get Monitoring Console")
return false, err
}

mcImage, err := getCurrentImage(ctx, c, monitoringConsole, SplunkMonitoringConsole)
if err != nil {
eventPublisher.Warning(ctx, "UpgradePathValidation", fmt.Sprintf("Could not get the Monitoring Console Image. Reason %v", err))
scopedLog.Error(err, "Unable to get Monitoring Console current image")
return false, err
}

// check if an image upgrade is happening and whether MC has finished updating yet, return false to stop
// further reconcile operations on custom resource until MC is ready
if monitoringConsole.Status.Phase != enterpriseApi.PhaseReady || mcImage != spec.Image {
return false, nil
}

goto SearchHeadCluster
}
SearchHeadCluster:
Expand Down

0 comments on commit d6e73ef

Please sign in to comment.