Skip to content

Commit ebd60f9

Browse files
committed
Promote Backupvault to beta
1 parent fea4a34 commit ebd60f9

31 files changed

+605
-353
lines changed

apis/backupdr/v1alpha1/generate.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ cd ${REPO_ROOT}/dev/tools/controllerbuilder
2424
go run . generate-types \
2525
--service google.cloud.backupdr.v1 \
2626
--api-version backupdr.cnrm.cloud.google.com/v1alpha1 \
27-
--resource BackupDRManagementServer:ManagementServer \
28-
--resource BackupDRBackupVault:BackupVault
27+
--resource BackupDRManagementServer:ManagementServer
2928

3029
go run . generate-mapper \
3130
--multiversion \

apis/backupdr/v1alpha1/types.generated.go

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apis/backupdr/v1alpha1/zz_generated.deepcopy.go

Lines changed: 0 additions & 264 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apis/backupdr/v1beta1/backupplan_types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ type BackupDRBackupPlanSpec struct {
6666
// location for backups.
6767
// +kcc:proto:field=google.cloud.backupdr.v1.BackupPlan.backup_vault
6868
// +required
69-
BackupVaultRef *v1alpha1.BackupVaultRef `json:"backupVaultRef,omitempty"`
69+
BackupVaultRef *BackupVaultRef `json:"backupVaultRef,omitempty"`
7070
}
7171

7272
// BackupDRBackupPlanStatus defines the config connector machine state of BackupDRBackupPlan

apis/backupdr/v1alpha1/backupvault_identity.go renamed to apis/backupdr/v1beta1/backupvault_identity.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
package v1alpha1
15+
package v1beta1
1616

1717
import (
1818
"context"

apis/backupdr/v1alpha1/backupvault_reference.go renamed to apis/backupdr/v1beta1/backupvault_reference.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
package v1alpha1
15+
package v1beta1
1616

1717
import (
1818
"context"

apis/backupdr/v1alpha1/backupvault_types.go renamed to apis/backupdr/v1beta1/backupvault_types.go

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,26 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
package v1alpha1
15+
package v1beta1
1616

1717
import (
18+
refsv1beta1 "github.com/GoogleCloudPlatform/k8s-config-connector/apis/refs/v1beta1"
1819
"github.com/GoogleCloudPlatform/k8s-config-connector/pkg/apis/k8s/v1alpha1"
1920
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
2021
)
2122

2223
var BackupDRBackupVaultGVK = GroupVersion.WithKind("BackupDRBackupVault")
2324

25+
type Parent struct {
26+
// +required
27+
ProjectRef *refsv1beta1.ProjectRef `json:"projectRef"`
28+
29+
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="Location field is immutable"
30+
// Immutable.
31+
// +required
32+
Location string `json:"location"`
33+
}
34+
2435
// BackupDRBackupVaultSpec defines the desired state of BackupDRBackupVault
2536
// +kcc:spec:proto=google.cloud.backupdr.v1.BackupVault
2637
type BackupDRBackupVaultSpec struct {
@@ -140,14 +151,15 @@ type BackupDRBackupVaultObservedState struct {
140151
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
141152
// +kubebuilder:resource:categories=gcp,shortName=gcpbackupdrbackupvault;gcpbackupdrbackupvaults
142153
// +kubebuilder:subresource:status
143-
// +kubebuilder:metadata:labels="cnrm.cloud.google.com/managed-by-kcc=true";"cnrm.cloud.google.com/system=true"
154+
// +kubebuilder:metadata:labels="cnrm.cloud.google.com/managed-by-kcc=true";"cnrm.cloud.google.com/system=true";"internal.cloud.google.com/additional-versions=v1alpha1"
144155
// +kubebuilder:printcolumn:name="Age",JSONPath=".metadata.creationTimestamp",type="date"
145156
// +kubebuilder:printcolumn:name="Ready",JSONPath=".status.conditions[?(@.type=='Ready')].status",type="string",description="When 'True', the most recent reconcile of the resource succeeded"
146157
// +kubebuilder:printcolumn:name="Status",JSONPath=".status.conditions[?(@.type=='Ready')].reason",type="string",description="The reason for the value in 'Ready'"
147158
// +kubebuilder:printcolumn:name="Status Age",JSONPath=".status.conditions[?(@.type=='Ready')].lastTransitionTime",type="date",description="The last transition time for the value in 'Status'"
148159

149160
// BackupDRBackupVault is the Schema for the BackupDRBackupVault API
150161
// +k8s:openapi-gen=true
162+
// +kubebuilder:storageversion
151163
type BackupDRBackupVault struct {
152164
metav1.TypeMeta `json:",inline"`
153165
metav1.ObjectMeta `json:"metadata,omitempty"`

apis/backupdr/v1beta1/generate.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ go run . generate-types \
2525
--service google.cloud.backupdr.v1 \
2626
--api-version backupdr.cnrm.cloud.google.com/v1beta1 \
2727
--resource BackupDRBackupPlanAssociation:BackupPlanAssociation \
28-
--resource BackupDRBackupPlan:BackupPlan
28+
--resource BackupDRBackupPlan:BackupPlan \
29+
--resource BackupDRBackupVault:BackupVault \
30+
2931

3032
go run . generate-mapper \
3133
--multiversion \

apis/backupdr/v1beta1/groupversion_info.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import (
2323

2424
var (
2525
// GroupVersion is group version used to register these objects
26-
GroupVersion = schema.GroupVersion{Group: "backupdr.cnrm.cloud.google.com", Version: "v1beta1"}
26+
GroupVersion = schema.GroupVersion{Group: "backupdr.cnrm.cloud.google.com", Version: "v1alpha1"}
2727

2828
// SchemeBuilder is used to add go types to the GroupVersionKind scheme
2929
SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

apis/backupdr/v1beta1/types.generated.go

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)