Skip to content

Commit

Permalink
Clean CR status message when necessary
Browse files Browse the repository at this point in the history
  • Loading branch information
akondur committed Jul 23, 2024
1 parent 078acbe commit a171761
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/splunk/enterprise/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -2145,6 +2145,7 @@ func fetchCurrentCRWithStatusUpdate(ctx context.Context, client splcommon.Contro
}

// CSPL-2626 - Update error
origCR.(*enterpriseApi.Standalone).Status.Message = ""
if (crError != nil) && ((*crError) != nil) {
origCR.(*enterpriseApi.Standalone).Status.Message = (*crError).Error()
}
Expand All @@ -2168,6 +2169,7 @@ func fetchCurrentCRWithStatusUpdate(ctx context.Context, client splcommon.Contro
}

// CSPL-2626 - Update error
origCR.(*enterpriseApi.LicenseManager).Status.Message = ""
if (crError != nil) && ((*crError) != nil) {
origCR.(*enterpriseApi.LicenseManager).Status.Message = (*crError).Error()
}
Expand All @@ -2182,6 +2184,7 @@ func fetchCurrentCRWithStatusUpdate(ctx context.Context, client splcommon.Contro
}

// CSPL-2626 - Update error
origCR.(*enterpriseApi.SearchHeadCluster).Status.Message = ""
if (crError != nil) && ((*crError) != nil) {
origCR.(*enterpriseApi.SearchHeadCluster).Status.Message = (*crError).Error()
}
Expand All @@ -2196,6 +2199,7 @@ func fetchCurrentCRWithStatusUpdate(ctx context.Context, client splcommon.Contro
}

// CSPL-2626 - Update error
origCR.(*enterpriseApi.IndexerCluster).Status.Message = ""
if (crError != nil) && ((*crError) != nil) {
origCR.(*enterpriseApi.IndexerCluster).Status.Message = (*crError).Error()
}
Expand All @@ -2219,6 +2223,7 @@ func fetchCurrentCRWithStatusUpdate(ctx context.Context, client splcommon.Contro
}

// CSPL-2626 - Update error
origCR.(*enterpriseApi.ClusterManager).Status.Message = ""
if (crError != nil) && ((*crError) != nil) {
origCR.(*enterpriseApi.ClusterManager).Status.Message = (*crError).Error()
}
Expand All @@ -2233,6 +2238,7 @@ func fetchCurrentCRWithStatusUpdate(ctx context.Context, client splcommon.Contro
}

// CSPL-2626 - Update error
origCR.(*enterpriseApi.MonitoringConsole).Status.Message = ""
if (crError != nil) && ((*crError) != nil) {
origCR.(*enterpriseApi.MonitoringConsole).Status.Message = (*crError).Error()
}
Expand Down

0 comments on commit a171761

Please sign in to comment.