From adb65bc635fc6a12d459a3f0e876cd9a46b086a2 Mon Sep 17 00:00:00 2001 From: hasheddan Date: Mon, 7 Sep 2020 16:27:42 -0500 Subject: [PATCH] Mark ReferenceTo as deprecated ReferenceTo returns a pointer to an ObjectReference, which should be avoided in favor of a more scoped reference type. Signed-off-by: hasheddan --- pkg/meta/meta.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/meta/meta.go b/pkg/meta/meta.go index 3134ab1..c6df1b2 100644 --- a/pkg/meta/meta.go +++ b/pkg/meta/meta.go @@ -54,6 +54,9 @@ const ( // ReferenceTo returns an object reference to the supplied object, presumed to // be of the supplied group, version, and kind. +// Deprecated: use a more specific reference type, such as TypedReference or +// Reference instead of the overly verbose ObjectReference. +// See https://github.com/crossplane/crossplane-runtime/issues/49 func ReferenceTo(o metav1.Object, of schema.GroupVersionKind) *corev1.ObjectReference { v, k := of.ToAPIVersionAndKind() return &corev1.ObjectReference{