Use PartialMetadata for annotating objects

Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
This commit is contained in:
Somtochi Onyekwere 2022-02-17 11:02:20 +01:00
parent 100e928546
commit ae5fbba16b
1 changed files with 1 additions and 2 deletions

View File

@ -35,7 +35,6 @@ import (
"github.com/google/go-github/v41/github"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/apimachinery/pkg/types"
"sigs.k8s.io/controller-runtime/pkg/client"
@ -373,7 +372,7 @@ func (s *ReceiverServer) annotate(ctx context.Context, resource v1beta1.CrossNam
group, version := getGroupVersion(apiVersion)
u := &unstructured.Unstructured{}
u := &metav1.PartialObjectMetadata{}
u.SetGroupVersionKind(schema.GroupVersionKind{
Group: group,
Kind: resource.Kind,