From 52cc9b82b733a2da4be77cc26859e108a2401302 Mon Sep 17 00:00:00 2001 From: hasheddan Date: Thu, 19 Nov 2020 20:01:01 -0600 Subject: [PATCH] Move embedded API types to v1 Moves the core embedded API types out of the core/v1alpha1 directory and into common/v1. These types are used by many mature APIs and are now recognized as stable. This new package should be imported with alias xpv1 by convention. Signed-off-by: hasheddan --- apis/{core/v1alpha1 => common/v1}/condition.go | 2 +- apis/{core/v1alpha1 => common/v1}/condition_test.go | 2 +- apis/{core/v1alpha1 => common/v1}/doc.go | 6 ++---- apis/{core/v1alpha1 => common/v1}/policies.go | 2 +- apis/{core/v1alpha1 => common/v1}/resource.go | 2 +- apis/{core/v1alpha1 => common/v1}/zz_generated.deepcopy.go | 6 +++--- 6 files changed, 9 insertions(+), 11 deletions(-) rename apis/{core/v1alpha1 => common/v1}/condition.go (99%) rename apis/{core/v1alpha1 => common/v1}/condition_test.go (99%) rename apis/{core/v1alpha1 => common/v1}/doc.go (79%) rename apis/{core/v1alpha1 => common/v1}/policies.go (98%) rename apis/{core/v1alpha1 => common/v1}/resource.go (99%) rename apis/{core/v1alpha1 => common/v1}/zz_generated.deepcopy.go (99%) diff --git a/apis/core/v1alpha1/condition.go b/apis/common/v1/condition.go similarity index 99% rename from apis/core/v1alpha1/condition.go rename to apis/common/v1/condition.go index 6ecab45..b49a74e 100644 --- a/apis/core/v1alpha1/condition.go +++ b/apis/common/v1/condition.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1alpha1 +package v1 import ( "sort" diff --git a/apis/core/v1alpha1/condition_test.go b/apis/common/v1/condition_test.go similarity index 99% rename from apis/core/v1alpha1/condition_test.go rename to apis/common/v1/condition_test.go index b3bd270..5b9ab06 100644 --- a/apis/core/v1alpha1/condition_test.go +++ b/apis/common/v1/condition_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1alpha1 +package v1 import ( "testing" diff --git a/apis/core/v1alpha1/doc.go b/apis/common/v1/doc.go similarity index 79% rename from apis/core/v1alpha1/doc.go rename to apis/common/v1/doc.go index b016a01..9b99de7 100644 --- a/apis/core/v1alpha1/doc.go +++ b/apis/common/v1/doc.go @@ -14,8 +14,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Package v1alpha1 contains core API types used by most Crossplane resources. +// Package v1 contains core API types used by most Crossplane resources. // +kubebuilder:object:generate=true -// +groupName=core.crossplane.io -// +versionName=v1alpha1 -package v1alpha1 +package v1 diff --git a/apis/core/v1alpha1/policies.go b/apis/common/v1/policies.go similarity index 98% rename from apis/core/v1alpha1/policies.go rename to apis/common/v1/policies.go index 23e9a60..1265666 100644 --- a/apis/core/v1alpha1/policies.go +++ b/apis/common/v1/policies.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1alpha1 +package v1 // A DeletionPolicy determines what should happen to the underlying external // resource when a managed resource is deleted. diff --git a/apis/core/v1alpha1/resource.go b/apis/common/v1/resource.go similarity index 99% rename from apis/core/v1alpha1/resource.go rename to apis/common/v1/resource.go index fc89a3e..d3d9621 100644 --- a/apis/core/v1alpha1/resource.go +++ b/apis/common/v1/resource.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1alpha1 +package v1 import ( corev1 "k8s.io/api/core/v1" diff --git a/apis/core/v1alpha1/zz_generated.deepcopy.go b/apis/common/v1/zz_generated.deepcopy.go similarity index 99% rename from apis/core/v1alpha1/zz_generated.deepcopy.go rename to apis/common/v1/zz_generated.deepcopy.go index 6d86217..6bd879c 100644 --- a/apis/core/v1alpha1/zz_generated.deepcopy.go +++ b/apis/common/v1/zz_generated.deepcopy.go @@ -18,10 +18,10 @@ limitations under the License. // Code generated by controller-gen. DO NOT EDIT. -package v1alpha1 +package v1 import ( - "k8s.io/api/core/v1" + corev1 "k8s.io/api/core/v1" ) // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -295,7 +295,7 @@ func (in *TargetSpec) DeepCopyInto(out *TargetSpec) { } if in.ResourceReference != nil { in, out := &in.ResourceReference, &out.ResourceReference - *out = new(v1.ObjectReference) + *out = new(corev1.ObjectReference) **out = **in } }