diff --git a/pkg/controller/operators/olm/operatorgroup.go b/pkg/controller/operators/olm/operatorgroup.go index 34b5925761..92c70c649f 100644 --- a/pkg/controller/operators/olm/operatorgroup.go +++ b/pkg/controller/operators/olm/operatorgroup.go @@ -9,6 +9,8 @@ import ( "reflect" "strings" + "k8s.io/apimachinery/pkg/api/equality" + "github.com/sirupsen/logrus" corev1 "k8s.io/api/core/v1" rbacv1 "k8s.io/api/rbac/v1" @@ -1030,7 +1032,7 @@ func (a *Operator) ensureOpGroupClusterRole(op *operatorsv1.OperatorGroup, suffi } // ensure that the labels and aggregation rules are correct - if labels.Equals(existingRole.Labels, cp.Labels) && reflect.DeepEqual(existingRole.AggregationRule, aggregationRule) { + if labels.Equals(existingRole.Labels, cp.Labels) && equality.Semantic.DeepEqual(existingRole.AggregationRule, aggregationRule) { return nil } diff --git a/pkg/lib/ownerutil/util.go b/pkg/lib/ownerutil/util.go index a07c4f019e..6bbd7eb5f0 100644 --- a/pkg/lib/ownerutil/util.go +++ b/pkg/lib/ownerutil/util.go @@ -2,6 +2,7 @@ package ownerutil import ( "fmt" + log "github.com/sirupsen/logrus" corev1 "k8s.io/api/core/v1" rbac "k8s.io/api/rbac/v1"