Skip to content

Commit

Permalink
Add group kind label to only kubernetesReferences
Browse files Browse the repository at this point in the history
  • Loading branch information
super-harsh committed Dec 4, 2023
1 parent 371ad08 commit d33d1a6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions v2/pkg/common/labels/labels.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ func SetOwnerNameLabel(obj genruntime.ARMMetaObject) {
}

func SetOwnerGroupKindLabel(obj genruntime.ARMMetaObject) {
if obj.Owner() != nil && obj.Owner().String() != "" {
genruntime.AddLabel(obj, OwnerGroupKindLabel, obj.Owner().String())
if obj.Owner() != nil && obj.Owner().IsKubernetesReference() {
genruntime.AddLabel(obj, OwnerGroupKindLabel, obj.Owner().GroupKind().String())
}
}

0 comments on commit d33d1a6

Please sign in to comment.