Skip to content

Commit

Permalink
review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
sivakumar subraani committed Nov 21, 2023
1 parent 705ac31 commit b3bce5d
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions pkg/controllers/dataexport/reconcile.go
Original file line number Diff line number Diff line change
Expand Up @@ -276,16 +276,13 @@ func (c *Controller) sync(ctx context.Context, in *kdmpapi.DataExport) (bool, er

kdmpData, err := core.Instance().GetConfigMap(utils.KdmpConfigmapName, utils.KdmpConfigmapNamespace)
if err != nil {
logrus.Errorf("failed reading config map %v: %v", utils.KdmpConfigmapName, err)
if err != nil {
msg := fmt.Sprintf("Failed in parsing the excludeFileList configmap parameter from configmap [%v/%v]", utils.KdmpConfigmapNamespace, utils.KdmpConfigmapName)
logrus.Errorf(msg)
data := updateDataExportDetail{
status: kdmpapi.DataExportStatusFailed,
reason: msg,
}
return false, c.updateStatus(dataExport, data)
msg := fmt.Sprintf("Failed in reading the configmap [%v/%v]", utils.KdmpConfigmapNamespace, utils.KdmpConfigmapName)
logrus.Errorf(msg)
data := updateDataExportDetail{
status: kdmpapi.DataExportStatusFailed,
reason: msg,
}
return false, c.updateStatus(dataExport, data)
} else {
compressionType = kdmpData.Data[compressionKey]
if len(compressionType) == 0 {
Expand Down

0 comments on commit b3bce5d

Please sign in to comment.