Skip to content

Commit

Permalink
fixed field manualUpdate in per Cr config
Browse files Browse the repository at this point in the history
Signed-off-by: Vivek Reddy <[email protected]>
  • Loading branch information
vivekr-splunk committed Nov 18, 2024
1 parent 9593814 commit 86826ff
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pkg/splunk/enterprise/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ func ReconcileCRSpecificConfigMap(ctx context.Context, client splcommon.Controll
Namespace: cr.GetNamespace(),
},
Data: map[string]string{
"ManualUpdate": "off",
"manualUpdate": "off",
},
}
err = client.Create(ctx, configMap)
Expand All @@ -272,14 +272,14 @@ func ReconcileCRSpecificConfigMap(ctx context.Context, client splcommon.Controll
}

// Check if the ManualUpdate field exists
if _, exists := configMap.Data["ManualUpdate"]; !exists {
configMap.Data["ManualUpdate"] = "off"
if _, exists := configMap.Data["manualUpdate"]; !exists {
configMap.Data["manualUpdate"] = "off"
err = client.Update(ctx, configMap)
if err != nil {
scopedLog.Error(err, "Failed to update config map with ManualUpdate field")
scopedLog.Error(err, "Failed to update config map with manualUpdate field")
return err
}
scopedLog.Info("Updated config map with ManualUpdate set to 'on'")
scopedLog.Info("Updated config map with manualUpdate set to 'on'")
}

return nil
Expand Down

0 comments on commit 86826ff

Please sign in to comment.