Skip to content

Commit

Permalink
fix comment
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryan Zhang committed Jan 13, 2023
1 parent 47c51b5 commit 1cc5031
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/controllers/work/patch_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,11 @@ func setModifiedConfigurationAnnotation(obj runtime.Object) error {
func getOriginalConfiguration(obj runtime.Object) ([]byte, error) {
annots, err := metadataAccessor.Annotations(obj)
if err != nil {
klog.Warning("cannot access metadata.annotations", "error", err)
return nil, nil
klog.ErrorS(err, "cannot access metadata.annotations", "gvk", obj.GetObjectKind().GroupVersionKind())
return nil, err
}
if annots == nil {
klog.Warning("object does not have lastAppliedConfigAnnotation", "obj", obj)
klog.Warning("object does not have annotation", "obj", obj)
return nil, nil
}
original, ok := annots[lastAppliedConfigAnnotation]
Expand Down

0 comments on commit 1cc5031

Please sign in to comment.