Skip to content

Commit

Permalink
Update controllers/configurationpolicy_controller.go
Browse files Browse the repository at this point in the history
Co-authored-by: Matt Prahl <mprahl@users.noreply.github.com>
  • Loading branch information
dhaiducek and mprahl committed Apr 11, 2024
1 parent 573cb1b commit ddaec9b
Showing 1 changed file with 2 additions and 19 deletions.
21 changes: 2 additions & 19 deletions controllers/configurationpolicy_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -2810,25 +2810,8 @@ func handleKeys(
continue
}

// check key for mismatch
errorMsg, keyUpdateNeeded, mergedObj, skipped := handleSingleKey(
key, desiredObj, existingObjectCopy, compType, zeroValueEqualsNil,
)
if errorMsg != "" {
log.Info(errorMsg)

return true, errorMsg, true, statusMismatch
}

// If the mergedObj is nil, we'll use the value to erase it from the existing object.
if skipped {
continue
}

if keyUpdateNeeded {
existingObj.Object[key] = mergedObj
updateNeeded = true
}
delete(existingObj.Object, key)
updateNeeded = true

Check failure on line 2814 in controllers/configurationpolicy_controller.go

View workflow job for this annotation

GitHub Actions / KinD tests (minimum)

assignments should only be cuddled with other assignments (wsl)

Check failure on line 2814 in controllers/configurationpolicy_controller.go

View workflow job for this annotation

GitHub Actions / KinD tests (latest)

assignments should only be cuddled with other assignments (wsl)
}
}

Expand Down

0 comments on commit ddaec9b

Please sign in to comment.