diff --git a/apis/backupdr/v1alpha1/generate.sh b/apis/backupdr/v1alpha1/generate.sh index 994f80b0110..f5b0e0cd7f1 100755 --- a/apis/backupdr/v1alpha1/generate.sh +++ b/apis/backupdr/v1alpha1/generate.sh @@ -24,8 +24,7 @@ cd ${REPO_ROOT}/dev/tools/controllerbuilder go run . generate-types \ --service google.cloud.backupdr.v1 \ --api-version backupdr.cnrm.cloud.google.com/v1alpha1 \ - --resource BackupDRManagementServer:ManagementServer \ - --resource BackupDRBackupVault:BackupVault + --resource BackupDRManagementServer:ManagementServer go run . generate-mapper \ --multiversion \ diff --git a/apis/backupdr/v1alpha1/types.generated.go b/apis/backupdr/v1alpha1/types.generated.go index c6c2a095971..b3802f55ecc 100644 --- a/apis/backupdr/v1alpha1/types.generated.go +++ b/apis/backupdr/v1alpha1/types.generated.go @@ -17,7 +17,6 @@ // krm.version: v1alpha1 // proto.service: google.cloud.backupdr.v1 // resource: BackupDRManagementServer:ManagementServer -// resource: BackupDRBackupVault:BackupVault package v1alpha1 diff --git a/apis/backupdr/v1alpha1/zz_generated.deepcopy.go b/apis/backupdr/v1alpha1/zz_generated.deepcopy.go index 222e31a470c..f63daaa246b 100644 --- a/apis/backupdr/v1alpha1/zz_generated.deepcopy.go +++ b/apis/backupdr/v1alpha1/zz_generated.deepcopy.go @@ -24,213 +24,6 @@ import ( runtime "k8s.io/apimachinery/pkg/runtime" ) -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *BackupDRBackupVault) DeepCopyInto(out *BackupDRBackupVault) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackupDRBackupVault. -func (in *BackupDRBackupVault) DeepCopy() *BackupDRBackupVault { - if in == nil { - return nil - } - out := new(BackupDRBackupVault) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *BackupDRBackupVault) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *BackupDRBackupVaultList) DeepCopyInto(out *BackupDRBackupVaultList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]BackupDRBackupVault, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackupDRBackupVaultList. -func (in *BackupDRBackupVaultList) DeepCopy() *BackupDRBackupVaultList { - if in == nil { - return nil - } - out := new(BackupDRBackupVaultList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *BackupDRBackupVaultList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *BackupDRBackupVaultObservedState) DeepCopyInto(out *BackupDRBackupVaultObservedState) { - *out = *in - if in.CreateTime != nil { - in, out := &in.CreateTime, &out.CreateTime - *out = new(string) - **out = **in - } - if in.UpdateTime != nil { - in, out := &in.UpdateTime, &out.UpdateTime - *out = new(string) - **out = **in - } - if in.Deletable != nil { - in, out := &in.Deletable, &out.Deletable - *out = new(bool) - **out = **in - } - if in.State != nil { - in, out := &in.State, &out.State - *out = new(string) - **out = **in - } - if in.BackupCount != nil { - in, out := &in.BackupCount, &out.BackupCount - *out = new(int64) - **out = **in - } - if in.ServiceAccount != nil { - in, out := &in.ServiceAccount, &out.ServiceAccount - *out = new(string) - **out = **in - } - if in.TotalStoredBytes != nil { - in, out := &in.TotalStoredBytes, &out.TotalStoredBytes - *out = new(int64) - **out = **in - } - if in.UID != nil { - in, out := &in.UID, &out.UID - *out = new(string) - **out = **in - } - if in.Etag != nil { - in, out := &in.Etag, &out.Etag - *out = new(string) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackupDRBackupVaultObservedState. -func (in *BackupDRBackupVaultObservedState) DeepCopy() *BackupDRBackupVaultObservedState { - if in == nil { - return nil - } - out := new(BackupDRBackupVaultObservedState) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *BackupDRBackupVaultSpec) DeepCopyInto(out *BackupDRBackupVaultSpec) { - *out = *in - if in.ResourceID != nil { - in, out := &in.ResourceID, &out.ResourceID - *out = new(string) - **out = **in - } - in.Parent.DeepCopyInto(&out.Parent) - if in.Description != nil { - in, out := &in.Description, &out.Description - *out = new(string) - **out = **in - } - if in.BackupMinimumEnforcedRetentionDuration != nil { - in, out := &in.BackupMinimumEnforcedRetentionDuration, &out.BackupMinimumEnforcedRetentionDuration - *out = new(string) - **out = **in - } - if in.EffectiveTime != nil { - in, out := &in.EffectiveTime, &out.EffectiveTime - *out = new(string) - **out = **in - } - if in.Annotations != nil { - in, out := &in.Annotations, &out.Annotations - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.AccessRestriction != nil { - in, out := &in.AccessRestriction, &out.AccessRestriction - *out = new(string) - **out = **in - } - if in.IgnoreInactiveDatasources != nil { - in, out := &in.IgnoreInactiveDatasources, &out.IgnoreInactiveDatasources - *out = new(bool) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackupDRBackupVaultSpec. -func (in *BackupDRBackupVaultSpec) DeepCopy() *BackupDRBackupVaultSpec { - if in == nil { - return nil - } - out := new(BackupDRBackupVaultSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *BackupDRBackupVaultStatus) DeepCopyInto(out *BackupDRBackupVaultStatus) { - *out = *in - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]k8sv1alpha1.Condition, len(*in)) - copy(*out, *in) - } - if in.ObservedGeneration != nil { - in, out := &in.ObservedGeneration, &out.ObservedGeneration - *out = new(int64) - **out = **in - } - if in.ExternalRef != nil { - in, out := &in.ExternalRef, &out.ExternalRef - *out = new(string) - **out = **in - } - if in.ObservedState != nil { - in, out := &in.ObservedState, &out.ObservedState - *out = new(BackupDRBackupVaultObservedState) - (*in).DeepCopyInto(*out) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackupDRBackupVaultStatus. -func (in *BackupDRBackupVaultStatus) DeepCopy() *BackupDRBackupVaultStatus { - if in == nil { - return nil - } - out := new(BackupDRBackupVaultStatus) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *BackupDRManagementServer) DeepCopyInto(out *BackupDRManagementServer) { *out = *in @@ -425,56 +218,6 @@ func (in *BackupDRManagementServerStatus) DeepCopy() *BackupDRManagementServerSt return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *BackupVaultIdentity) DeepCopyInto(out *BackupVaultIdentity) { - *out = *in - if in.parent != nil { - in, out := &in.parent, &out.parent - *out = new(BackupVaultParent) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackupVaultIdentity. -func (in *BackupVaultIdentity) DeepCopy() *BackupVaultIdentity { - if in == nil { - return nil - } - out := new(BackupVaultIdentity) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *BackupVaultParent) DeepCopyInto(out *BackupVaultParent) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackupVaultParent. -func (in *BackupVaultParent) DeepCopy() *BackupVaultParent { - if in == nil { - return nil - } - out := new(BackupVaultParent) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *BackupVaultRef) DeepCopyInto(out *BackupVaultRef) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackupVaultRef. -func (in *BackupVaultRef) DeepCopy() *BackupVaultRef { - if in == nil { - return nil - } - out := new(BackupVaultRef) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ManagementServerIdentity) DeepCopyInto(out *ManagementServerIdentity) { *out = *in diff --git a/apis/backupdr/v1beta1/backupplan_types.go b/apis/backupdr/v1beta1/backupplan_types.go index 87bce6b6fef..89cb8dbd231 100644 --- a/apis/backupdr/v1beta1/backupplan_types.go +++ b/apis/backupdr/v1beta1/backupplan_types.go @@ -66,7 +66,7 @@ type BackupDRBackupPlanSpec struct { // location for backups. // +kcc:proto:field=google.cloud.backupdr.v1.BackupPlan.backup_vault // +required - BackupVaultRef *v1alpha1.BackupVaultRef `json:"backupVaultRef,omitempty"` + BackupVaultRef *BackupVaultRef `json:"backupVaultRef,omitempty"` } // BackupDRBackupPlanStatus defines the config connector machine state of BackupDRBackupPlan diff --git a/apis/backupdr/v1alpha1/backupvault_identity.go b/apis/backupdr/v1beta1/backupvault_identity.go similarity index 99% rename from apis/backupdr/v1alpha1/backupvault_identity.go rename to apis/backupdr/v1beta1/backupvault_identity.go index 1cc2af07ec7..769022b5993 100644 --- a/apis/backupdr/v1alpha1/backupvault_identity.go +++ b/apis/backupdr/v1beta1/backupvault_identity.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package v1alpha1 +package v1beta1 import ( "context" diff --git a/apis/backupdr/v1alpha1/backupvault_reference.go b/apis/backupdr/v1beta1/backupvault_reference.go similarity index 99% rename from apis/backupdr/v1alpha1/backupvault_reference.go rename to apis/backupdr/v1beta1/backupvault_reference.go index 15dc82892da..c5b97b4e6ec 100644 --- a/apis/backupdr/v1alpha1/backupvault_reference.go +++ b/apis/backupdr/v1beta1/backupvault_reference.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package v1alpha1 +package v1beta1 import ( "context" diff --git a/apis/backupdr/v1alpha1/backupvault_types.go b/apis/backupdr/v1beta1/backupvault_types.go similarity index 94% rename from apis/backupdr/v1alpha1/backupvault_types.go rename to apis/backupdr/v1beta1/backupvault_types.go index 48f266ae51e..7eabea659d8 100644 --- a/apis/backupdr/v1alpha1/backupvault_types.go +++ b/apis/backupdr/v1beta1/backupvault_types.go @@ -12,15 +12,26 @@ // See the License for the specific language governing permissions and // limitations under the License. -package v1alpha1 +package v1beta1 import ( + refsv1beta1 "github.com/GoogleCloudPlatform/k8s-config-connector/apis/refs/v1beta1" "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/apis/k8s/v1alpha1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) var BackupDRBackupVaultGVK = GroupVersion.WithKind("BackupDRBackupVault") +type Parent struct { + // +required + ProjectRef *refsv1beta1.ProjectRef `json:"projectRef"` + + // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="Location field is immutable" + // Immutable. + // +required + Location string `json:"location"` +} + // BackupDRBackupVaultSpec defines the desired state of BackupDRBackupVault // +kcc:spec:proto=google.cloud.backupdr.v1.BackupVault type BackupDRBackupVaultSpec struct { @@ -140,7 +151,7 @@ type BackupDRBackupVaultObservedState struct { // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +kubebuilder:resource:categories=gcp,shortName=gcpbackupdrbackupvault;gcpbackupdrbackupvaults // +kubebuilder:subresource:status -// +kubebuilder:metadata:labels="cnrm.cloud.google.com/managed-by-kcc=true";"cnrm.cloud.google.com/system=true" +// +kubebuilder:metadata:labels="cnrm.cloud.google.com/managed-by-kcc=true";"cnrm.cloud.google.com/system=true";"internal.cloud.google.com/additional-versions=v1alpha1" // +kubebuilder:printcolumn:name="Age",JSONPath=".metadata.creationTimestamp",type="date" // +kubebuilder:printcolumn:name="Ready",JSONPath=".status.conditions[?(@.type=='Ready')].status",type="string",description="When 'True', the most recent reconcile of the resource succeeded" // +kubebuilder:printcolumn:name="Status",JSONPath=".status.conditions[?(@.type=='Ready')].reason",type="string",description="The reason for the value in 'Ready'" @@ -148,6 +159,7 @@ type BackupDRBackupVaultObservedState struct { // BackupDRBackupVault is the Schema for the BackupDRBackupVault API // +k8s:openapi-gen=true +// +kubebuilder:storageversion type BackupDRBackupVault struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` diff --git a/apis/backupdr/v1beta1/generate.sh b/apis/backupdr/v1beta1/generate.sh index 8653420fa48..1918d7d11ea 100755 --- a/apis/backupdr/v1beta1/generate.sh +++ b/apis/backupdr/v1beta1/generate.sh @@ -25,7 +25,9 @@ go run . generate-types \ --service google.cloud.backupdr.v1 \ --api-version backupdr.cnrm.cloud.google.com/v1beta1 \ --resource BackupDRBackupPlanAssociation:BackupPlanAssociation \ - --resource BackupDRBackupPlan:BackupPlan + --resource BackupDRBackupPlan:BackupPlan \ + --resource BackupDRBackupVault:BackupVault \ + go run . generate-mapper \ --multiversion \ diff --git a/apis/backupdr/v1beta1/types.generated.go b/apis/backupdr/v1beta1/types.generated.go index 9be20d554c3..084bab3e6c4 100644 --- a/apis/backupdr/v1beta1/types.generated.go +++ b/apis/backupdr/v1beta1/types.generated.go @@ -18,6 +18,7 @@ // proto.service: google.cloud.backupdr.v1 // resource: BackupDRBackupPlanAssociation:BackupPlanAssociation // resource: BackupDRBackupPlan:BackupPlan +// resource: BackupDRBackupVault:BackupVault package v1beta1 diff --git a/apis/backupdr/v1beta1/zz_generated.deepcopy.go b/apis/backupdr/v1beta1/zz_generated.deepcopy.go index f88ea96d780..4963b656a33 100644 --- a/apis/backupdr/v1beta1/zz_generated.deepcopy.go +++ b/apis/backupdr/v1beta1/zz_generated.deepcopy.go @@ -19,9 +19,9 @@ package v1beta1 import ( - "github.com/GoogleCloudPlatform/k8s-config-connector/apis/backupdr/v1alpha1" computev1beta1 "github.com/GoogleCloudPlatform/k8s-config-connector/apis/compute/v1beta1" - k8sv1alpha1 "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/apis/k8s/v1alpha1" + refsv1beta1 "github.com/GoogleCloudPlatform/k8s-config-connector/apis/refs/v1beta1" + "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/apis/k8s/v1alpha1" runtime "k8s.io/apimachinery/pkg/runtime" ) @@ -219,7 +219,7 @@ func (in *BackupDRBackupPlanAssociationStatus) DeepCopyInto(out *BackupDRBackupP *out = *in if in.Conditions != nil { in, out := &in.Conditions, &out.Conditions - *out = make([]k8sv1alpha1.Condition, len(*in)) + *out = make([]v1alpha1.Condition, len(*in)) copy(*out, *in) } if in.ObservedGeneration != nil { @@ -344,7 +344,7 @@ func (in *BackupDRBackupPlanSpec) DeepCopyInto(out *BackupDRBackupPlanSpec) { } if in.BackupVaultRef != nil { in, out := &in.BackupVaultRef, &out.BackupVaultRef - *out = new(v1alpha1.BackupVaultRef) + *out = new(BackupVaultRef) **out = **in } } @@ -364,7 +364,7 @@ func (in *BackupDRBackupPlanStatus) DeepCopyInto(out *BackupDRBackupPlanStatus) *out = *in if in.Conditions != nil { in, out := &in.Conditions, &out.Conditions - *out = make([]k8sv1alpha1.Condition, len(*in)) + *out = make([]v1alpha1.Condition, len(*in)) copy(*out, *in) } if in.ObservedGeneration != nil { @@ -394,6 +394,213 @@ func (in *BackupDRBackupPlanStatus) DeepCopy() *BackupDRBackupPlanStatus { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *BackupDRBackupVault) DeepCopyInto(out *BackupDRBackupVault) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackupDRBackupVault. +func (in *BackupDRBackupVault) DeepCopy() *BackupDRBackupVault { + if in == nil { + return nil + } + out := new(BackupDRBackupVault) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *BackupDRBackupVault) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *BackupDRBackupVaultList) DeepCopyInto(out *BackupDRBackupVaultList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]BackupDRBackupVault, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackupDRBackupVaultList. +func (in *BackupDRBackupVaultList) DeepCopy() *BackupDRBackupVaultList { + if in == nil { + return nil + } + out := new(BackupDRBackupVaultList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *BackupDRBackupVaultList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *BackupDRBackupVaultObservedState) DeepCopyInto(out *BackupDRBackupVaultObservedState) { + *out = *in + if in.CreateTime != nil { + in, out := &in.CreateTime, &out.CreateTime + *out = new(string) + **out = **in + } + if in.UpdateTime != nil { + in, out := &in.UpdateTime, &out.UpdateTime + *out = new(string) + **out = **in + } + if in.Deletable != nil { + in, out := &in.Deletable, &out.Deletable + *out = new(bool) + **out = **in + } + if in.State != nil { + in, out := &in.State, &out.State + *out = new(string) + **out = **in + } + if in.BackupCount != nil { + in, out := &in.BackupCount, &out.BackupCount + *out = new(int64) + **out = **in + } + if in.ServiceAccount != nil { + in, out := &in.ServiceAccount, &out.ServiceAccount + *out = new(string) + **out = **in + } + if in.TotalStoredBytes != nil { + in, out := &in.TotalStoredBytes, &out.TotalStoredBytes + *out = new(int64) + **out = **in + } + if in.UID != nil { + in, out := &in.UID, &out.UID + *out = new(string) + **out = **in + } + if in.Etag != nil { + in, out := &in.Etag, &out.Etag + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackupDRBackupVaultObservedState. +func (in *BackupDRBackupVaultObservedState) DeepCopy() *BackupDRBackupVaultObservedState { + if in == nil { + return nil + } + out := new(BackupDRBackupVaultObservedState) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *BackupDRBackupVaultSpec) DeepCopyInto(out *BackupDRBackupVaultSpec) { + *out = *in + if in.ResourceID != nil { + in, out := &in.ResourceID, &out.ResourceID + *out = new(string) + **out = **in + } + in.Parent.DeepCopyInto(&out.Parent) + if in.Description != nil { + in, out := &in.Description, &out.Description + *out = new(string) + **out = **in + } + if in.BackupMinimumEnforcedRetentionDuration != nil { + in, out := &in.BackupMinimumEnforcedRetentionDuration, &out.BackupMinimumEnforcedRetentionDuration + *out = new(string) + **out = **in + } + if in.EffectiveTime != nil { + in, out := &in.EffectiveTime, &out.EffectiveTime + *out = new(string) + **out = **in + } + if in.Annotations != nil { + in, out := &in.Annotations, &out.Annotations + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.AccessRestriction != nil { + in, out := &in.AccessRestriction, &out.AccessRestriction + *out = new(string) + **out = **in + } + if in.IgnoreInactiveDatasources != nil { + in, out := &in.IgnoreInactiveDatasources, &out.IgnoreInactiveDatasources + *out = new(bool) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackupDRBackupVaultSpec. +func (in *BackupDRBackupVaultSpec) DeepCopy() *BackupDRBackupVaultSpec { + if in == nil { + return nil + } + out := new(BackupDRBackupVaultSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *BackupDRBackupVaultStatus) DeepCopyInto(out *BackupDRBackupVaultStatus) { + *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]v1alpha1.Condition, len(*in)) + copy(*out, *in) + } + if in.ObservedGeneration != nil { + in, out := &in.ObservedGeneration, &out.ObservedGeneration + *out = new(int64) + **out = **in + } + if in.ExternalRef != nil { + in, out := &in.ExternalRef, &out.ExternalRef + *out = new(string) + **out = **in + } + if in.ObservedState != nil { + in, out := &in.ObservedState, &out.ObservedState + *out = new(BackupDRBackupVaultObservedState) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackupDRBackupVaultStatus. +func (in *BackupDRBackupVaultStatus) DeepCopy() *BackupDRBackupVaultStatus { + if in == nil { + return nil + } + out := new(BackupDRBackupVaultStatus) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *BackupPlanAssociationIdentity) DeepCopyInto(out *BackupPlanAssociationIdentity) { *out = *in @@ -524,6 +731,56 @@ func (in *BackupRule) DeepCopy() *BackupRule { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *BackupVaultIdentity) DeepCopyInto(out *BackupVaultIdentity) { + *out = *in + if in.parent != nil { + in, out := &in.parent, &out.parent + *out = new(BackupVaultParent) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackupVaultIdentity. +func (in *BackupVaultIdentity) DeepCopy() *BackupVaultIdentity { + if in == nil { + return nil + } + out := new(BackupVaultIdentity) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *BackupVaultParent) DeepCopyInto(out *BackupVaultParent) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackupVaultParent. +func (in *BackupVaultParent) DeepCopy() *BackupVaultParent { + if in == nil { + return nil + } + out := new(BackupVaultParent) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *BackupVaultRef) DeepCopyInto(out *BackupVaultRef) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackupVaultRef. +func (in *BackupVaultRef) DeepCopy() *BackupVaultRef { + if in == nil { + return nil + } + out := new(BackupVaultRef) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *BackupWindow) DeepCopyInto(out *BackupWindow) { *out = *in @@ -584,6 +841,26 @@ func (in *CloudSQLInstanceBackupPlanAssociationPropertiesObservedState) DeepCopy return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Parent) DeepCopyInto(out *Parent) { + *out = *in + if in.ProjectRef != nil { + in, out := &in.ProjectRef, &out.ProjectRef + *out = new(refsv1beta1.ProjectRef) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Parent. +func (in *Parent) DeepCopy() *Parent { + if in == nil { + return nil + } + out := new(Parent) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Resource) DeepCopyInto(out *Resource) { *out = *in diff --git a/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_backupdrbackupvaults.backupdr.cnrm.cloud.google.com.yaml b/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_backupdrbackupvaults.backupdr.cnrm.cloud.google.com.yaml index 0c00158b27a..a0c6685d2f7 100644 --- a/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_backupdrbackupvaults.backupdr.cnrm.cloud.google.com.yaml +++ b/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_backupdrbackupvaults.backupdr.cnrm.cloud.google.com.yaml @@ -39,7 +39,7 @@ spec: jsonPath: .status.conditions[?(@.type=='Ready')].lastTransitionTime name: Status Age type: date - name: v1alpha1 + name: v1beta1 schema: openAPIV3Schema: description: BackupDRBackupVault is the Schema for the BackupDRBackupVault @@ -232,3 +232,212 @@ spec: storage: true subresources: status: {} + - additionalPrinterColumns: + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + - description: When 'True', the most recent reconcile of the resource succeeded + jsonPath: .status.conditions[?(@.type=='Ready')].status + name: Ready + type: string + - description: The reason for the value in 'Ready' + jsonPath: .status.conditions[?(@.type=='Ready')].reason + name: Status + type: string + - description: The last transition time for the value in 'Status' + jsonPath: .status.conditions[?(@.type=='Ready')].lastTransitionTime + name: Status Age + type: date + name: v1alpha1 + schema: + openAPIV3Schema: + description: BackupDRBackupVault is the Schema for the BackupDRBackupVault + API + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: BackupDRBackupVaultSpec defines the desired state of BackupDRBackupVault + properties: + accessRestriction: + description: |- + Optional. Note: This field is added for future use case and will not be + supported in the current release. + + Access restriction for the backup vault. + Default value is WITHIN_ORGANIZATION if not provided during creation. + type: string + annotations: + additionalProperties: + type: string + description: Optional. User annotations. See https://google.aip.dev/128#annotations + Stores small amounts of arbitrary data. + type: object + backupMinimumEnforcedRetentionDuration: + description: Required. The default and minimum enforced retention + for each backup within the backup vault. The enforced retention + for each backup can be extended. + type: string + description: + description: Optional. The description of the BackupVault instance + (2048 characters or less). + type: string + effectiveTime: + description: Optional. Time after which the BackupVault resource is + locked. + type: string + ignoreInactiveDatasources: + description: Optional. If set to true, allows deletion of a backup + vault even when it contains inactive data sources. This overrides + the default restriction that prevents deletion of backup vaults + with any data sources, even if those data sources are inactive. + type: boolean + location: + description: Immutable. + type: string + x-kubernetes-validations: + - message: Location field is immutable + rule: self == oldSelf + projectRef: + description: The Project that this resource belongs to. + oneOf: + - not: + required: + - external + required: + - name + - not: + anyOf: + - required: + - name + - required: + - namespace + required: + - external + properties: + external: + description: The `projectID` field of a project, when not managed + by Config Connector. + type: string + kind: + description: The kind of the Project resource; optional but must + be `Project` if provided. + type: string + name: + description: The `name` field of a `Project` resource. + type: string + namespace: + description: The `namespace` field of a `Project` resource. + type: string + type: object + resourceID: + description: The BackupDRBackupVault name. If not given, the metadata.name + will be used. + type: string + required: + - backupMinimumEnforcedRetentionDuration + - location + - projectRef + type: object + status: + description: BackupDRBackupVaultStatus defines the config connector machine + state of BackupDRBackupVault + properties: + conditions: + description: Conditions represent the latest available observations + of the object's current state. + items: + properties: + lastTransitionTime: + description: Last time the condition transitioned from one status + to another. + type: string + message: + description: Human-readable message indicating details about + last transition. + type: string + reason: + description: Unique, one-word, CamelCase reason for the condition's + last transition. + type: string + status: + description: Status is the status of the condition. Can be True, + False, Unknown. + type: string + type: + description: Type is the type of the condition. + type: string + type: object + type: array + externalRef: + description: A unique specifier for the BackupDRBackupVault resource + in GCP. + type: string + observedGeneration: + description: ObservedGeneration is the generation of the resource + that was most recently observed by the Config Connector controller. + If this is equal to metadata.generation, then that means that the + current reported status reflects the most recent desired state of + the resource. + format: int64 + type: integer + observedState: + description: ObservedState is the state of the resource as most recently + observed in GCP. + properties: + backupCount: + description: Output only. The number of backups in this backup + vault. + format: int64 + type: integer + createTime: + description: Output only. The time when the instance was created. + type: string + deletable: + description: Output only. Set to true when there are no backups + nested under this resource. + type: boolean + etag: + description: Output only. A tag that confirms the content of the + BackupVault resource. + type: string + serviceAccount: + description: Output only. Service account used by the BackupVault + Service for this BackupVault. The user should grant this account + permissions in their workload project to enable the service + to run backups and restores there. + type: string + state: + description: Output only. The BackupVault resource instance state. + type: string + totalStoredBytes: + description: Output only. Total size of the storage used by all + backup resources. + format: int64 + type: integer + uid: + description: Output only. Immutable after resource creation until + resource deletion. + type: string + updateTime: + description: Output only. The time when the instance was updated. + type: string + type: object + type: object + required: + - spec + type: object + served: true + storage: false + subresources: + status: {} diff --git a/docs/reports/crd_report.csv b/docs/reports/crd_report.csv index 698318f49d5..a15f362fe7f 100644 --- a/docs/reports/crd_report.csv +++ b/docs/reports/crd_report.csv @@ -39,7 +39,7 @@ asset.cnrm.cloud.google.com,AssetFeed,True,True,False,Direct asset.cnrm.cloud.google.com,AssetSavedQuery,True,True,False,Direct backupdr.cnrm.cloud.google.com,BackupDRBackupPlanAssociation,True,True,False,Direct backupdr.cnrm.cloud.google.com,BackupDRBackupPlan,True,True,False,Direct -backupdr.cnrm.cloud.google.com,BackupDRBackupVault,True,False,False,Direct +backupdr.cnrm.cloud.google.com,BackupDRBackupVault,True,True,False,Direct backupdr.cnrm.cloud.google.com,BackupDRManagementServer,True,False,False,Direct batch.cnrm.cloud.google.com,BatchJob,True,False,False,Direct batch.cnrm.cloud.google.com,BatchTask,True,False,False,Direct diff --git a/docs/reports/crd_report.md b/docs/reports/crd_report.md index 0a863beb8b6..2bf20d776ad 100644 --- a/docs/reports/crd_report.md +++ b/docs/reports/crd_report.md @@ -42,7 +42,7 @@ | asset.cnrm.cloud.google.com | AssetSavedQuery | True | True | False | Direct | | backupdr.cnrm.cloud.google.com | BackupDRBackupPlanAssociation | True | True | False | Direct | | backupdr.cnrm.cloud.google.com | BackupDRBackupPlan | True | True | False | Direct | -| backupdr.cnrm.cloud.google.com | BackupDRBackupVault | True | False | False | Direct | +| backupdr.cnrm.cloud.google.com | BackupDRBackupVault | True | True | False | Direct | | backupdr.cnrm.cloud.google.com | BackupDRManagementServer | True | False | False | Direct | | batch.cnrm.cloud.google.com | BatchJob | True | False | False | Direct | | batch.cnrm.cloud.google.com | BatchTask | True | False | False | Direct | diff --git a/pkg/controller/direct/backupdr/backupplan_controller.go b/pkg/controller/direct/backupdr/backupplan_controller.go index bd16ca8b6b7..2283b61b22d 100644 --- a/pkg/controller/direct/backupdr/backupplan_controller.go +++ b/pkg/controller/direct/backupdr/backupplan_controller.go @@ -25,7 +25,6 @@ import ( "fmt" "reflect" - krmv1alpha1 "github.com/GoogleCloudPlatform/k8s-config-connector/apis/backupdr/v1alpha1" krm "github.com/GoogleCloudPlatform/k8s-config-connector/apis/backupdr/v1beta1" "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/config" "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/controller/direct" @@ -211,7 +210,7 @@ func (a *BackupPlanAdapter) Export(ctx context.Context) (*unstructured.Unstructu if mapCtx.Err() != nil { return nil, mapCtx.Err() } - obj.Spec.BackupVaultRef = &krmv1alpha1.BackupVaultRef{External: a.actual.BackupVault} + obj.Spec.BackupVaultRef = &krm.BackupVaultRef{External: a.actual.BackupVault} obj.Spec.Location = a.id.Parent().Location uObj, err := runtime.DefaultUnstructuredConverter.ToUnstructured(obj) if err != nil { diff --git a/pkg/controller/direct/backupdr/backupplan_mappers.go b/pkg/controller/direct/backupdr/backupplan_mappers.go index ea499d2999b..5bfbdc2e419 100644 --- a/pkg/controller/direct/backupdr/backupplan_mappers.go +++ b/pkg/controller/direct/backupdr/backupplan_mappers.go @@ -20,7 +20,6 @@ package backupdr import ( pb "cloud.google.com/go/backupdr/apiv1/backupdrpb" - krmbackupdrv1alpha1 "github.com/GoogleCloudPlatform/k8s-config-connector/apis/backupdr/v1alpha1" krm "github.com/GoogleCloudPlatform/k8s-config-connector/apis/backupdr/v1beta1" "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/controller/direct" ) @@ -35,7 +34,7 @@ func BackupDRBackupPlanSpec_v1beta1_FromProto(mapCtx *direct.MapContext, in *pb. out.BackupRules = direct.Slice_FromProto(mapCtx, in.BackupRules, BackupRule_v1beta1_FromProto) out.ResourceType = direct.LazyPtr(in.GetResourceType()) if in.GetBackupVault() != "" { - out.BackupVaultRef = &krmbackupdrv1alpha1.BackupVaultRef{ + out.BackupVaultRef = &krm.BackupVaultRef{ External: in.GetBackupVault(), } } diff --git a/pkg/controller/direct/backupdr/backupvault_controller.go b/pkg/controller/direct/backupdr/backupvault_controller.go index 99c4a952fe5..d62adfc8aab 100644 --- a/pkg/controller/direct/backupdr/backupvault_controller.go +++ b/pkg/controller/direct/backupdr/backupvault_controller.go @@ -16,7 +16,7 @@ // proto.service: google.cloud.backupdr.v1.BackupDR // proto.message: google.cloud.backupdr.v1.BackupVault // crd.type: BackupDRBackupVault -// crd.version: v1alpha1 +// crd.version: v1beta1 package backupdr @@ -25,7 +25,7 @@ import ( "fmt" "reflect" - krm "github.com/GoogleCloudPlatform/k8s-config-connector/apis/backupdr/v1alpha1" + krm "github.com/GoogleCloudPlatform/k8s-config-connector/apis/backupdr/v1beta1" refs "github.com/GoogleCloudPlatform/k8s-config-connector/apis/refs/v1beta1" "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/config" "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/controller/direct" @@ -79,7 +79,7 @@ func (m *modelBackupVault) AdapterForObject(ctx context.Context, reader client.R mapCtx := &direct.MapContext{} // Convert KCC resource spec to GCP proto message - desiredProto := BackupDRBackupVaultSpec_v1alpha1_ToProto(mapCtx, &obj.Spec) + desiredProto := BackupDRBackupVaultSpec_v1beta1_ToProto(mapCtx, &obj.Spec) if mapCtx.Err() != nil { return nil, mapCtx.Err() } @@ -155,7 +155,7 @@ func (a *BackupVaultAdapter) Create(ctx context.Context, createOp *directbase.Cr log.V(2).Info("successfully created BackupVault", "name", a.id) status := &krm.BackupDRBackupVaultStatus{} - status.ObservedState = BackupDRBackupVaultObservedState_v1alpha1_FromProto(mapCtx, created) + status.ObservedState = BackupDRBackupVaultObservedState_v1beta1_FromProto(mapCtx, created) if mapCtx.Err() != nil { return mapCtx.Err() } @@ -214,7 +214,7 @@ func (a *BackupVaultAdapter) Update(ctx context.Context, updateOp *directbase.Up } status := &krm.BackupDRBackupVaultStatus{} - status.ObservedState = BackupDRBackupVaultObservedState_v1alpha1_FromProto(mapCtx, updated) + status.ObservedState = BackupDRBackupVaultObservedState_v1beta1_FromProto(mapCtx, updated) if mapCtx.Err() != nil { return mapCtx.Err() } @@ -231,7 +231,7 @@ func (a *BackupVaultAdapter) Export(ctx context.Context) (*unstructured.Unstruct obj := &krm.BackupDRBackupVault{} mapCtx := &direct.MapContext{} - obj.Spec = direct.ValueOf(BackupDRBackupVaultSpec_v1alpha1_FromProto(mapCtx, a.actual)) + obj.Spec = direct.ValueOf(BackupDRBackupVaultSpec_v1beta1_FromProto(mapCtx, a.actual)) if mapCtx.Err() != nil { return nil, mapCtx.Err() } diff --git a/pkg/controller/direct/backupdr/backupvault_fuzzer.go b/pkg/controller/direct/backupdr/backupvault_fuzzer.go index 2b217dae4be..dd015e648e3 100644 --- a/pkg/controller/direct/backupdr/backupvault_fuzzer.go +++ b/pkg/controller/direct/backupdr/backupvault_fuzzer.go @@ -29,8 +29,8 @@ func init() { func backupDRBackupVaultFuzzer() fuzztesting.KRMFuzzer { f := fuzztesting.NewKRMTypedFuzzer(&pb.BackupVault{}, - BackupDRBackupVaultSpec_v1alpha1_FromProto, BackupDRBackupVaultSpec_v1alpha1_ToProto, - BackupDRBackupVaultObservedState_v1alpha1_FromProto, BackupDRBackupVaultObservedState_v1alpha1_ToProto, + BackupDRBackupVaultSpec_v1beta1_FromProto, BackupDRBackupVaultSpec_v1beta1_ToProto, + BackupDRBackupVaultObservedState_v1beta1_FromProto, BackupDRBackupVaultObservedState_v1beta1_ToProto, ) f.SpecFields.Insert(".description") diff --git a/pkg/controller/direct/backupdr/backupvault_mappers.go b/pkg/controller/direct/backupdr/backupvault_mappers.go index 0e511977730..25a19c7ce4d 100644 --- a/pkg/controller/direct/backupdr/backupvault_mappers.go +++ b/pkg/controller/direct/backupdr/backupvault_mappers.go @@ -17,11 +17,11 @@ package backupdr import ( pb "cloud.google.com/go/backupdr/apiv1/backupdrpb" - krm "github.com/GoogleCloudPlatform/k8s-config-connector/apis/backupdr/v1alpha1" + krm "github.com/GoogleCloudPlatform/k8s-config-connector/apis/backupdr/v1beta1" "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/controller/direct" ) -func BackupDRBackupVaultObservedState_v1alpha1_FromProto(mapCtx *direct.MapContext, in *pb.BackupVault) *krm.BackupDRBackupVaultObservedState { +func BackupDRBackupVaultObservedState_v1beta1_FromProto(mapCtx *direct.MapContext, in *pb.BackupVault) *krm.BackupDRBackupVaultObservedState { if in == nil { return nil } @@ -38,7 +38,7 @@ func BackupDRBackupVaultObservedState_v1alpha1_FromProto(mapCtx *direct.MapConte out.UID = direct.LazyPtr(in.GetUid()) return out } -func BackupDRBackupVaultObservedState_v1alpha1_ToProto(mapCtx *direct.MapContext, in *krm.BackupDRBackupVaultObservedState) *pb.BackupVault { +func BackupDRBackupVaultObservedState_v1beta1_ToProto(mapCtx *direct.MapContext, in *krm.BackupDRBackupVaultObservedState) *pb.BackupVault { if in == nil { return nil } @@ -55,7 +55,7 @@ func BackupDRBackupVaultObservedState_v1alpha1_ToProto(mapCtx *direct.MapContext out.Etag = in.Etag return out } -func BackupDRBackupVaultSpec_v1alpha1_ToProto(mapCtx *direct.MapContext, in *krm.BackupDRBackupVaultSpec) *pb.BackupVault { +func BackupDRBackupVaultSpec_v1beta1_ToProto(mapCtx *direct.MapContext, in *krm.BackupDRBackupVaultSpec) *pb.BackupVault { if in == nil { return nil } diff --git a/pkg/controller/direct/backupdr/mapper.generated.go b/pkg/controller/direct/backupdr/mapper.generated.go index 5130afeeb3e..5325c80bf28 100644 --- a/pkg/controller/direct/backupdr/mapper.generated.go +++ b/pkg/controller/direct/backupdr/mapper.generated.go @@ -116,11 +116,11 @@ func BackupDRBackupPlanSpec_v1beta1_ToProto(mapCtx *direct.MapContext, in *krm.B // MISSING: RevisionName return out } -func BackupDRBackupVaultSpec_v1alpha1_FromProto(mapCtx *direct.MapContext, in *pb.BackupVault) *krmbackupdrv1alpha1.BackupDRBackupVaultSpec { +func BackupDRBackupVaultSpec_v1beta1_FromProto(mapCtx *direct.MapContext, in *pb.BackupVault) *krm.BackupDRBackupVaultSpec { if in == nil { return nil } - out := &krmbackupdrv1alpha1.BackupDRBackupVaultSpec{} + out := &krm.BackupDRBackupVaultSpec{} // MISSING: Name out.Description = in.Description // MISSING: Labels diff --git a/pkg/test/resourcefixture/testdata/basic/backupdr/v1alpha1/backupdrbackupvault/backupdrbackupvault-full/_generated_object_backupdrbackupvault-full.golden.yaml b/pkg/test/resourcefixture/testdata/basic/backupdr/v1beta1/backupdrbackupvault/backupdrbackupvault-full/_generated_object_backupdrbackupvault-full.golden.yaml similarity index 95% rename from pkg/test/resourcefixture/testdata/basic/backupdr/v1alpha1/backupdrbackupvault/backupdrbackupvault-full/_generated_object_backupdrbackupvault-full.golden.yaml rename to pkg/test/resourcefixture/testdata/basic/backupdr/v1beta1/backupdrbackupvault/backupdrbackupvault-full/_generated_object_backupdrbackupvault-full.golden.yaml index eae3aa04df0..1b05d32e47e 100644 --- a/pkg/test/resourcefixture/testdata/basic/backupdr/v1alpha1/backupdrbackupvault/backupdrbackupvault-full/_generated_object_backupdrbackupvault-full.golden.yaml +++ b/pkg/test/resourcefixture/testdata/basic/backupdr/v1beta1/backupdrbackupvault/backupdrbackupvault-full/_generated_object_backupdrbackupvault-full.golden.yaml @@ -1,4 +1,4 @@ -apiVersion: backupdr.cnrm.cloud.google.com/v1alpha1 +apiVersion: backupdr.cnrm.cloud.google.com/v1beta1 kind: BackupDRBackupVault metadata: annotations: diff --git a/pkg/test/resourcefixture/testdata/basic/backupdr/v1alpha1/backupdrbackupvault/backupdrbackupvault-full/_http.log b/pkg/test/resourcefixture/testdata/basic/backupdr/v1beta1/backupdrbackupvault/backupdrbackupvault-full/_http.log similarity index 100% rename from pkg/test/resourcefixture/testdata/basic/backupdr/v1alpha1/backupdrbackupvault/backupdrbackupvault-full/_http.log rename to pkg/test/resourcefixture/testdata/basic/backupdr/v1beta1/backupdrbackupvault/backupdrbackupvault-full/_http.log diff --git a/pkg/test/resourcefixture/testdata/basic/backupdr/v1alpha1/backupdrbackupvault/backupdrbackupvault-full/create.yaml b/pkg/test/resourcefixture/testdata/basic/backupdr/v1beta1/backupdrbackupvault/backupdrbackupvault-full/create.yaml similarity index 89% rename from pkg/test/resourcefixture/testdata/basic/backupdr/v1alpha1/backupdrbackupvault/backupdrbackupvault-full/create.yaml rename to pkg/test/resourcefixture/testdata/basic/backupdr/v1beta1/backupdrbackupvault/backupdrbackupvault-full/create.yaml index 322d901c063..97eb3067ce7 100644 --- a/pkg/test/resourcefixture/testdata/basic/backupdr/v1alpha1/backupdrbackupvault/backupdrbackupvault-full/create.yaml +++ b/pkg/test/resourcefixture/testdata/basic/backupdr/v1beta1/backupdrbackupvault/backupdrbackupvault-full/create.yaml @@ -1,4 +1,4 @@ -apiVersion: backupdr.cnrm.cloud.google.com/v1alpha1 +apiVersion: backupdr.cnrm.cloud.google.com/v1beta1 kind: BackupDRBackupVault metadata: name: backupdrbackupvault-full-${uniqueId} diff --git a/pkg/test/resourcefixture/testdata/basic/backupdr/v1alpha1/backupdrbackupvault/backupdrbackupvault-full/update.yaml b/pkg/test/resourcefixture/testdata/basic/backupdr/v1beta1/backupdrbackupvault/backupdrbackupvault-full/update.yaml similarity index 90% rename from pkg/test/resourcefixture/testdata/basic/backupdr/v1alpha1/backupdrbackupvault/backupdrbackupvault-full/update.yaml rename to pkg/test/resourcefixture/testdata/basic/backupdr/v1beta1/backupdrbackupvault/backupdrbackupvault-full/update.yaml index 92c761818bc..95dd63833b2 100644 --- a/pkg/test/resourcefixture/testdata/basic/backupdr/v1alpha1/backupdrbackupvault/backupdrbackupvault-full/update.yaml +++ b/pkg/test/resourcefixture/testdata/basic/backupdr/v1beta1/backupdrbackupvault/backupdrbackupvault-full/update.yaml @@ -1,4 +1,4 @@ -apiVersion: backupdr.cnrm.cloud.google.com/v1alpha1 +apiVersion: backupdr.cnrm.cloud.google.com/v1beta1 kind: BackupDRBackupVault metadata: name: backupdrbackupvault-full-${uniqueId} diff --git a/pkg/test/resourcefixture/testdata/basic/backupdr/v1beta1/backupdrbackupvault/backupdrbackupvault-labels/_generated_object_backupdrbackupvault-labels.golden.yaml b/pkg/test/resourcefixture/testdata/basic/backupdr/v1beta1/backupdrbackupvault/backupdrbackupvault-labels/_generated_object_backupdrbackupvault-labels.golden.yaml new file mode 100644 index 00000000000..029aec32a54 --- /dev/null +++ b/pkg/test/resourcefixture/testdata/basic/backupdr/v1beta1/backupdrbackupvault/backupdrbackupvault-labels/_generated_object_backupdrbackupvault-labels.golden.yaml @@ -0,0 +1,43 @@ +apiVersion: backupdr.cnrm.cloud.google.com/v1beta1 +kind: BackupDRBackupVault +metadata: + finalizers: + - cnrm.cloud.google.com/finalizer + - cnrm.cloud.google.com/deletion-defender + generation: 1 + labels: + app.kubernetes.io/component: mock-component + app.kubernetes.io/instance: mock-instance + app.kubernetes.io/managed-by: configmanagement.gke.io + app.kubernetes.io/name: mock-app + app.kubernetes.io/part-of: mock-part-of + app.kubernetes.io/version: v1.0.0 + applyset.kubernetes.io/id: mock-applyset-id + cnrm-test: "true" + configmanagement.gke.io/sync-name: mock-sync-name + configmanagement.gke.io/sync-namespace: mock-sync-namespace + custom-label: bar + name: backupdrbackupvault-labels + namespace: ${uniqueId} +spec: + backupMinimumEnforcedRetentionDuration: 86400s + location: us-central1 + projectRef: + external: ${projectId} +status: + conditions: + - lastTransitionTime: "1970-01-01T00:00:00Z" + message: The resource is up to date + reason: UpToDate + status: "True" + type: Ready + externalRef: projects/${projectId}/locations/us-central1/backupVaults/backupdrbackupvault-labels + observedGeneration: 1 + observedState: + createTime: "1970-01-01T00:00:00Z" + deletable: true + etag: abcdef123456 + serviceAccount: vault-${projectNumber}-12345@gcp-sa-backupdr-pr.iam.gserviceaccount.com + state: ACTIVE + uid: 0123456789abcdef + updateTime: "1970-01-01T00:00:00Z" diff --git a/pkg/test/resourcefixture/testdata/basic/backupdr/v1beta1/backupdrbackupvault/backupdrbackupvault-labels/_http.log b/pkg/test/resourcefixture/testdata/basic/backupdr/v1beta1/backupdrbackupvault/backupdrbackupvault-labels/_http.log new file mode 100644 index 00000000000..09ee8be999b --- /dev/null +++ b/pkg/test/resourcefixture/testdata/basic/backupdr/v1beta1/backupdrbackupvault/backupdrbackupvault-labels/_http.log @@ -0,0 +1,323 @@ +GET https://backupdr.googleapis.com/v1/projects/${projectId}/locations/us-central1/backupVaults/backupdrbackupvault-labels?%24alt=json%3Benum-encoding%3Dint +Content-Type: application/json +User-Agent: kcc/${kccVersion} (+https://github.com/GoogleCloudPlatform/k8s-config-connector) kcc/controller-manager/${kccVersion} +X-Goog-Request-Params: name=projects%2F${projectId}%2Flocations%2Fus-central1%2FbackupVaults%2Fbackupdrbackupvault-labels + +404 Not Found +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "error": { + "code": 404, + "message": "Resource 'projects/${projectId}/locations/us-central1/backupVaults/backupdrbackupvault-labels' was not found", + "status": "NOT_FOUND" + } +} + +--- + +POST https://backupdr.googleapis.com/v1/projects/${projectId}/locations/us-central1/backupVaults?%24alt=json%3Benum-encoding%3Dint&backupVaultId=backupdrbackupvault-labels +Content-Type: application/json +User-Agent: kcc/${kccVersion} (+https://github.com/GoogleCloudPlatform/k8s-config-connector) kcc/controller-manager/${kccVersion} +X-Goog-Request-Params: parent=projects%2F${projectId}%2Flocations%2Fus-central1 + +{ + "backupMinimumEnforcedRetentionDuration": "86400s", + "labels": { + "cnrm-test": "true", + "custom-label": "foo", + "managed-by-cnrm": "true" + } +} + +200 OK +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "metadata": { + "@type": "type.googleapis.com/google.cloud.backupdr.v1.OperationMetadata", + "apiVersion": "v1", + "createTime": "2024-04-01T12:34:56.123456Z", + "target": "projects/${projectId}/locations/us-central1/backupVaults/backupdrbackupvault-labels", + "verb": "create" + }, + "name": "projects/${projectId}/locations/us-central1/operations/${operationID}" +} + +--- + +GET https://backupdr.googleapis.com/v1/projects/${projectId}/locations/us-central1/operations/${operationID} +Content-Type: application/json +User-Agent: kcc/${kccVersion} (+https://github.com/GoogleCloudPlatform/k8s-config-connector) kcc/controller-manager/${kccVersion} +X-Goog-Request-Params: name=projects%2F${projectId}%2Flocations%2Fus-central1%2Foperations%2F${operationID} + +200 OK +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "done": true, + "metadata": { + "@type": "type.googleapis.com/google.cloud.backupdr.v1.OperationMetadata", + "apiVersion": "v1", + "createTime": "2024-04-01T12:34:56.123456Z", + "endTime": "2024-04-01T12:34:56.123456Z", + "target": "projects/${projectId}/locations/us-central1/backupVaults/backupdrbackupvault-labels", + "verb": "create" + }, + "name": "projects/${projectId}/locations/us-central1/operations/${operationID}", + "response": { + "@type": "type.googleapis.com/google.cloud.backupdr.v1.BackupVault", + "accessRestriction": "WITHIN_ORGANIZATION", + "backupMinimumEnforcedRetentionDuration": "86400s", + "createTime": "2024-04-01T12:34:56.123456Z", + "deletable": true, + "etag": "abcdef0123A=", + "labels": { + "cnrm-test": "true", + "custom-label": "foo", + "managed-by-cnrm": "true" + }, + "name": "projects/${projectId}/locations/us-central1/backupVaults/backupdrbackupvault-labels", + "serviceAccount": "vault-${projectNumber}-12345@gcp-sa-backupdr-pr.iam.gserviceaccount.com", + "state": "ACTIVE", + "uid": "111111111111111111111", + "updateTime": "2024-04-01T12:34:56.123456Z" + } +} + +--- + +GET https://backupdr.googleapis.com/v1/projects/${projectId}/locations/us-central1/backupVaults/backupdrbackupvault-labels?%24alt=json%3Benum-encoding%3Dint +Content-Type: application/json +User-Agent: kcc/${kccVersion} (+https://github.com/GoogleCloudPlatform/k8s-config-connector) kcc/controller-manager/${kccVersion} +X-Goog-Request-Params: name=projects%2F${projectId}%2Flocations%2Fus-central1%2FbackupVaults%2Fbackupdrbackupvault-labels + +200 OK +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "accessRestriction": 2, + "backupMinimumEnforcedRetentionDuration": "86400s", + "createTime": "2024-04-01T12:34:56.123456Z", + "deletable": true, + "etag": "abcdef0123A=", + "labels": { + "cnrm-test": "true", + "custom-label": "foo", + "managed-by-cnrm": "true" + }, + "name": "projects/${projectId}/locations/us-central1/backupVaults/backupdrbackupvault-labels", + "serviceAccount": "vault-${projectNumber}-12345@gcp-sa-backupdr-pr.iam.gserviceaccount.com", + "state": 2, + "uid": "111111111111111111111", + "updateTime": "2024-04-01T12:34:56.123456Z" +} + +--- + +PATCH https://backupdr.googleapis.com/v1/projects/${projectId}/locations/us-central1/backupVaults/backupdrbackupvault-labels?%24alt=json%3Benum-encoding%3Dint&updateMask=labels%2CbackupMinimumEnforcedRetentionDuration%2CaccessRestriction +Content-Type: application/json +User-Agent: kcc/${kccVersion} (+https://github.com/GoogleCloudPlatform/k8s-config-connector) kcc/controller-manager/${kccVersion} +X-Goog-Request-Params: backup_vault.name=projects%2F${projectId}%2Flocations%2Fus-central1%2FbackupVaults%2Fbackupdrbackupvault-labels + +{ + "backupMinimumEnforcedRetentionDuration": "86400s", + "etag": "abcdef0123A=", + "labels": { + "cnrm-test": "true", + "custom-label": "bar", + "managed-by-cnrm": "true" + }, + "name": "projects/${projectId}/locations/us-central1/backupVaults/backupdrbackupvault-labels" +} + +200 OK +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "metadata": { + "@type": "type.googleapis.com/google.cloud.backupdr.v1.OperationMetadata", + "apiVersion": "v1", + "createTime": "2024-04-01T12:34:56.123456Z", + "target": "projects/${projectId}/locations/us-central1/backupVaults/backupdrbackupvault-labels", + "verb": "update" + }, + "name": "projects/${projectId}/locations/us-central1/operations/${operationID}" +} + +--- + +GET https://backupdr.googleapis.com/v1/projects/${projectId}/locations/us-central1/operations/${operationID} +Content-Type: application/json +User-Agent: kcc/${kccVersion} (+https://github.com/GoogleCloudPlatform/k8s-config-connector) kcc/controller-manager/${kccVersion} +X-Goog-Request-Params: name=projects%2F${projectId}%2Flocations%2Fus-central1%2Foperations%2F${operationID} + +200 OK +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "done": true, + "metadata": { + "@type": "type.googleapis.com/google.cloud.backupdr.v1.OperationMetadata", + "apiVersion": "v1", + "createTime": "2024-04-01T12:34:56.123456Z", + "endTime": "2024-04-01T12:34:56.123456Z", + "target": "projects/${projectId}/locations/us-central1/backupVaults/backupdrbackupvault-labels", + "verb": "update" + }, + "name": "projects/${projectId}/locations/us-central1/operations/${operationID}", + "response": { + "@type": "type.googleapis.com/google.cloud.backupdr.v1.BackupVault", + "backupMinimumEnforcedRetentionDuration": "86400s", + "createTime": "2024-04-01T12:34:56.123456Z", + "deletable": true, + "etag": "abcdef0123A=", + "labels": { + "cnrm-test": "true", + "custom-label": "bar", + "managed-by-cnrm": "true" + }, + "name": "projects/${projectId}/locations/us-central1/backupVaults/backupdrbackupvault-labels", + "serviceAccount": "vault-${projectNumber}-12345@gcp-sa-backupdr-pr.iam.gserviceaccount.com", + "state": "ACTIVE", + "uid": "111111111111111111111", + "updateTime": "2024-04-01T12:34:56.123456Z" + } +} + +--- + +GET https://backupdr.googleapis.com/v1/projects/${projectId}/locations/us-central1/backupVaults/backupdrbackupvault-labels?%24alt=json%3Benum-encoding%3Dint +Content-Type: application/json +User-Agent: kcc/${kccVersion} (+https://github.com/GoogleCloudPlatform/k8s-config-connector) kcc/controller-manager/${kccVersion} +X-Goog-Request-Params: name=projects%2F${projectId}%2Flocations%2Fus-central1%2FbackupVaults%2Fbackupdrbackupvault-labels + +200 OK +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "backupMinimumEnforcedRetentionDuration": "86400s", + "createTime": "2024-04-01T12:34:56.123456Z", + "deletable": true, + "etag": "abcdef0123A=", + "labels": { + "cnrm-test": "true", + "custom-label": "bar", + "managed-by-cnrm": "true" + }, + "name": "projects/${projectId}/locations/us-central1/backupVaults/backupdrbackupvault-labels", + "serviceAccount": "vault-${projectNumber}-12345@gcp-sa-backupdr-pr.iam.gserviceaccount.com", + "state": 2, + "uid": "111111111111111111111", + "updateTime": "2024-04-01T12:34:56.123456Z" +} + +--- + +DELETE https://backupdr.googleapis.com/v1/projects/${projectId}/locations/us-central1/backupVaults/backupdrbackupvault-labels?%24alt=json%3Benum-encoding%3Dint +Content-Type: application/json +User-Agent: kcc/${kccVersion} (+https://github.com/GoogleCloudPlatform/k8s-config-connector) kcc/controller-manager/${kccVersion} +X-Goog-Request-Params: name=projects%2F${projectId}%2Flocations%2Fus-central1%2FbackupVaults%2Fbackupdrbackupvault-labels + +200 OK +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "metadata": { + "@type": "type.googleapis.com/google.cloud.backupdr.v1.OperationMetadata", + "apiVersion": "v1", + "createTime": "2024-04-01T12:34:56.123456Z", + "target": "projects/${projectId}/locations/us-central1/backupVaults/backupdrbackupvault-labels", + "verb": "delete" + }, + "name": "projects/${projectId}/locations/us-central1/operations/${operationID}" +} + +--- + +GET https://backupdr.googleapis.com/v1/projects/${projectId}/locations/us-central1/operations/${operationID} +Content-Type: application/json +User-Agent: kcc/${kccVersion} (+https://github.com/GoogleCloudPlatform/k8s-config-connector) kcc/controller-manager/${kccVersion} +X-Goog-Request-Params: name=projects%2F${projectId}%2Flocations%2Fus-central1%2Foperations%2F${operationID} + +200 OK +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "done": true, + "metadata": { + "@type": "type.googleapis.com/google.cloud.backupdr.v1.OperationMetadata", + "apiVersion": "v1", + "createTime": "2024-04-01T12:34:56.123456Z", + "endTime": "2024-04-01T12:34:56.123456Z", + "target": "projects/${projectId}/locations/us-central1/backupVaults/backupdrbackupvault-labels", + "verb": "delete" + }, + "name": "projects/${projectId}/locations/us-central1/operations/${operationID}", + "response": { + "@type": "type.googleapis.com/google.protobuf.Empty" + } +} \ No newline at end of file diff --git a/pkg/test/resourcefixture/testdata/basic/backupdr/v1beta1/backupdrbackupvault/backupdrbackupvault-labels/create.yaml b/pkg/test/resourcefixture/testdata/basic/backupdr/v1beta1/backupdrbackupvault/backupdrbackupvault-labels/create.yaml new file mode 100644 index 00000000000..0771ecc4ae2 --- /dev/null +++ b/pkg/test/resourcefixture/testdata/basic/backupdr/v1beta1/backupdrbackupvault/backupdrbackupvault-labels/create.yaml @@ -0,0 +1,20 @@ +apiVersion: backupdr.cnrm.cloud.google.com/v1beta1 +kind: BackupDRBackupVault +metadata: + name: backupdrbackupvault-labels + labels: + app.kubernetes.io/name: "mock-app" + app.kubernetes.io/instance: "mock-instance" + app.kubernetes.io/version: "v1.0.0" + app.kubernetes.io/component: "mock-component" + app.kubernetes.io/part-of: "mock-part-of" + app.kubernetes.io/managed-by: "configmanagement.gke.io" + applyset.kubernetes.io/id: mock-applyset-id + configmanagement.gke.io/sync-name: mock-sync-name + configmanagement.gke.io/sync-namespace: mock-sync-namespace + custom-label: "foo" # valid label +spec: + projectRef: + external: "${projectId}" + location: us-central1 + backupMinimumEnforcedRetentionDuration: "86400s" diff --git a/pkg/test/resourcefixture/testdata/basic/backupdr/v1beta1/backupdrbackupvault/backupdrbackupvault-labels/update.yaml b/pkg/test/resourcefixture/testdata/basic/backupdr/v1beta1/backupdrbackupvault/backupdrbackupvault-labels/update.yaml new file mode 100644 index 00000000000..ac1310cb6ab --- /dev/null +++ b/pkg/test/resourcefixture/testdata/basic/backupdr/v1beta1/backupdrbackupvault/backupdrbackupvault-labels/update.yaml @@ -0,0 +1,20 @@ +apiVersion: backupdr.cnrm.cloud.google.com/v1beta1 +kind: BackupDRBackupVault +metadata: + name: backupdrbackupvault-labels + labels: + app.kubernetes.io/name: "mock-app" + app.kubernetes.io/instance: "mock-instance" + app.kubernetes.io/version: "v1.0.0" + app.kubernetes.io/component: "mock-component" + app.kubernetes.io/part-of: "mock-part-of" + app.kubernetes.io/managed-by: "configmanagement.gke.io" + applyset.kubernetes.io/id: mock-applyset-id + configmanagement.gke.io/sync-name: mock-sync-name + configmanagement.gke.io/sync-namespace: mock-sync-namespace + custom-label: "bar" # updated valid label +spec: + projectRef: + external: "${projectId}" + location: us-central1 + backupMinimumEnforcedRetentionDuration: "86400s" diff --git a/pkg/test/resourcefixture/testdata/basic/backupdr/v1alpha1/backupdrbackupvault/backupdrbackupvault-minimal/_generated_object_backupdrbackupvault-minimal.golden.yaml b/pkg/test/resourcefixture/testdata/basic/backupdr/v1beta1/backupdrbackupvault/backupdrbackupvault-minimal/_generated_object_backupdrbackupvault-minimal.golden.yaml similarity index 96% rename from pkg/test/resourcefixture/testdata/basic/backupdr/v1alpha1/backupdrbackupvault/backupdrbackupvault-minimal/_generated_object_backupdrbackupvault-minimal.golden.yaml rename to pkg/test/resourcefixture/testdata/basic/backupdr/v1beta1/backupdrbackupvault/backupdrbackupvault-minimal/_generated_object_backupdrbackupvault-minimal.golden.yaml index 18dda393756..4acdb39568f 100644 --- a/pkg/test/resourcefixture/testdata/basic/backupdr/v1alpha1/backupdrbackupvault/backupdrbackupvault-minimal/_generated_object_backupdrbackupvault-minimal.golden.yaml +++ b/pkg/test/resourcefixture/testdata/basic/backupdr/v1beta1/backupdrbackupvault/backupdrbackupvault-minimal/_generated_object_backupdrbackupvault-minimal.golden.yaml @@ -1,4 +1,4 @@ -apiVersion: backupdr.cnrm.cloud.google.com/v1alpha1 +apiVersion: backupdr.cnrm.cloud.google.com/v1beta1 kind: BackupDRBackupVault metadata: finalizers: diff --git a/pkg/test/resourcefixture/testdata/basic/backupdr/v1alpha1/backupdrbackupvault/backupdrbackupvault-minimal/_http.log b/pkg/test/resourcefixture/testdata/basic/backupdr/v1beta1/backupdrbackupvault/backupdrbackupvault-minimal/_http.log similarity index 100% rename from pkg/test/resourcefixture/testdata/basic/backupdr/v1alpha1/backupdrbackupvault/backupdrbackupvault-minimal/_http.log rename to pkg/test/resourcefixture/testdata/basic/backupdr/v1beta1/backupdrbackupvault/backupdrbackupvault-minimal/_http.log diff --git a/pkg/test/resourcefixture/testdata/basic/backupdr/v1alpha1/backupdrbackupvault/backupdrbackupvault-minimal/create.yaml b/pkg/test/resourcefixture/testdata/basic/backupdr/v1beta1/backupdrbackupvault/backupdrbackupvault-minimal/create.yaml similarity index 96% rename from pkg/test/resourcefixture/testdata/basic/backupdr/v1alpha1/backupdrbackupvault/backupdrbackupvault-minimal/create.yaml rename to pkg/test/resourcefixture/testdata/basic/backupdr/v1beta1/backupdrbackupvault/backupdrbackupvault-minimal/create.yaml index 80ce041b3cd..70aa9f572c9 100644 --- a/pkg/test/resourcefixture/testdata/basic/backupdr/v1alpha1/backupdrbackupvault/backupdrbackupvault-minimal/create.yaml +++ b/pkg/test/resourcefixture/testdata/basic/backupdr/v1beta1/backupdrbackupvault/backupdrbackupvault-minimal/create.yaml @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -apiVersion: backupdr.cnrm.cloud.google.com/v1alpha1 +apiVersion: backupdr.cnrm.cloud.google.com/v1beta1 kind: BackupDRBackupVault metadata: name: backupdrbackupvault-minimal-${uniqueId} diff --git a/pkg/test/resourcefixture/testdata/basic/backupdr/v1alpha1/backupdrbackupvault/backupdrbackupvault-minimal/update.yaml b/pkg/test/resourcefixture/testdata/basic/backupdr/v1beta1/backupdrbackupvault/backupdrbackupvault-minimal/update.yaml similarity index 94% rename from pkg/test/resourcefixture/testdata/basic/backupdr/v1alpha1/backupdrbackupvault/backupdrbackupvault-minimal/update.yaml rename to pkg/test/resourcefixture/testdata/basic/backupdr/v1beta1/backupdrbackupvault/backupdrbackupvault-minimal/update.yaml index 14ed143b179..02b4183547b 100644 --- a/pkg/test/resourcefixture/testdata/basic/backupdr/v1alpha1/backupdrbackupvault/backupdrbackupvault-minimal/update.yaml +++ b/pkg/test/resourcefixture/testdata/basic/backupdr/v1beta1/backupdrbackupvault/backupdrbackupvault-minimal/update.yaml @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -apiVersion: backupdr.cnrm.cloud.google.com/v1alpha1 +apiVersion: backupdr.cnrm.cloud.google.com/v1beta1 kind: BackupDRBackupVault metadata: name: backupdrbackupvault-minimal-${uniqueId} diff --git a/tests/apichecks/testdata/exceptions/alpha-missingfields.txt b/tests/apichecks/testdata/exceptions/alpha-missingfields.txt index d348d669194..761f55cbeb5 100644 --- a/tests/apichecks/testdata/exceptions/alpha-missingfields.txt +++ b/tests/apichecks/testdata/exceptions/alpha-missingfields.txt @@ -267,7 +267,6 @@ [missing_field] crd=apphubdiscoveredservices.apphub.cnrm.cloud.google.com version=v1alpha1: field ".spec.projectRef" is not set; neither 'external' nor 'name' are set [missing_field] crd=apphubdiscoveredworkloads.apphub.cnrm.cloud.google.com version=v1alpha1: field ".spec.location" is not set in unstructured objects [missing_field] crd=apphubdiscoveredworkloads.apphub.cnrm.cloud.google.com version=v1alpha1: field ".spec.projectRef" is not set; neither 'external' nor 'name' are set -[missing_field] crd=backupdrbackupvaults.backupdr.cnrm.cloud.google.com version=v1alpha1: field ".spec.annotations" is not set in unstructured objects [missing_field] crd=backupdrmanagementservers.backupdr.cnrm.cloud.google.com version=v1alpha1: field ".spec.description" is not set in unstructured objects [missing_field] crd=backupdrmanagementservers.backupdr.cnrm.cloud.google.com version=v1alpha1: field ".spec.labels" is not set in unstructured objects [missing_field] crd=backupdrmanagementservers.backupdr.cnrm.cloud.google.com version=v1alpha1: field ".spec.networks[].peeringMode" is not set in unstructured objects diff --git a/tests/apichecks/testdata/exceptions/missingfields.txt b/tests/apichecks/testdata/exceptions/missingfields.txt index ca486747490..a45905de9e5 100644 --- a/tests/apichecks/testdata/exceptions/missingfields.txt +++ b/tests/apichecks/testdata/exceptions/missingfields.txt @@ -103,6 +103,7 @@ [missing_field] crd=assetsavedqueries.asset.cnrm.cloud.google.com version=v1beta1: field ".spec.folderRef" is not set; neither 'external' nor 'name' are set [missing_field] crd=assetsavedqueries.asset.cnrm.cloud.google.com version=v1beta1: field ".spec.labels" is not set in unstructured objects [missing_field] crd=assetsavedqueries.asset.cnrm.cloud.google.com version=v1beta1: field ".spec.organizationRef" is not set; neither 'external' nor 'name' are set +[missing_field] crd=backupdrbackupvaults.backupdr.cnrm.cloud.google.com version=v1beta1: field ".spec.annotations" is not set in unstructured objects [missing_field] crd=bigqueryanalyticshublistings.bigqueryanalyticshub.cnrm.cloud.google.com version=v1beta1: field ".spec.source.bigQueryDatasetSource.selectedResources[].tableRef" is not set; neither 'external' nor 'name' are set [missing_field] crd=bigqueryconnectionconnections.bigqueryconnection.cnrm.cloud.google.com version=v1beta1: field ".spec.cloudSpanner.useServerlessAnalytics" is not set in unstructured objects [missing_field] crd=bigqueryconnectionconnections.bigqueryconnection.cnrm.cloud.google.com version=v1beta1: field ".spec.spark.metastoreService.metastoreServiceRef" is not set; neither 'external' nor 'name' are set diff --git a/tests/releases/testdata/missing_reference.txt b/tests/releases/testdata/missing_reference.txt index 733c5c1bc6f..4a4b9e6f3aa 100644 --- a/tests/releases/testdata/missing_reference.txt +++ b/tests/releases/testdata/missing_reference.txt @@ -1,6 +1,7 @@ asset.cnrm.cloud.google.com/v1beta1, Kind=AssetFeed asset.cnrm.cloud.google.com/v1beta1, Kind=AssetSavedQuery backupdr.cnrm.cloud.google.com/v1beta1, Kind=BackupDRBackupPlan +backupdr.cnrm.cloud.google.com/v1beta1, Kind=BackupDRBackupVault bigquery.cnrm.cloud.google.com/v1beta1, Kind=BigQueryRoutine bigquerybiglake.cnrm.cloud.google.com/v1beta1, Kind=BigLakeTable bigqueryreservation.cnrm.cloud.google.com/v1beta1, Kind=BigQueryReservationAssignment