From c6e406215717b030dc40c97e00d6b15de9ab940e Mon Sep 17 00:00:00 2001 From: Aditya Bhatia Date: Mon, 2 May 2022 22:52:00 +0200 Subject: [PATCH] fix: kubernetes code-gen missing Resource --- operator/api/v1alpha1/groupversion_info.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/operator/api/v1alpha1/groupversion_info.go b/operator/api/v1alpha1/groupversion_info.go index cd1da9c12e..78a4562cbb 100644 --- a/operator/api/v1alpha1/groupversion_info.go +++ b/operator/api/v1alpha1/groupversion_info.go @@ -33,4 +33,11 @@ var ( // AddToScheme adds the types in this group-version to the given scheme. AddToScheme = SchemeBuilder.AddToScheme + + // SchemeGroupVersion is required by kubernetes code-generator + SchemeGroupVersion = GroupVersion ) + +func Resource(resource string) schema.GroupResource { + return GroupVersion.WithResource(resource).GroupResource() +}