Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix go format
Signed-off-by: YuChen <[email protected]>
  • Loading branch information
YuChen committed Sep 25, 2024
commit 96c5cf604e6f993515f466860b3c888d5c72a16d
7 changes: 3 additions & 4 deletions controllers/operandrequest/reconcile_operand.go
Original file line number Diff line number Diff line change
Expand Up @@ -1066,11 +1066,10 @@ func (r *Reconciler) updateK8sResource(ctx context.Context, existingK8sRes unstr

if k8sResConfig != nil {
k8sResConfigDecoded := make(map[string]interface{})
k8sResConfigUnmarshalErr := json.Unmarshal(k8sResConfig.Raw, &k8sResConfigDecoded)
if k8sResConfigUnmarshalErr != nil {
klog.Errorf("failed to unmarshal k8s Resource Config: %v", k8sResConfigUnmarshalErr)
if k8sResConfigUnmarshalErr := json.Unmarshal(k8sResConfig.Raw, &k8sResConfigDecoded); k8sResConfigUnmarshalErr != nil {
return errors.Wrap(k8sResConfigUnmarshalErr, "failed to unmarshal k8s Resource Config")
}

if host, found := k8sResConfigDecoded["spec"].(map[string]interface{})["host"].(string); found {
hostHash := util.CalculateHash(host)

Expand Down