Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions apis/backupdr/v1alpha1/generate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
1 change: 0 additions & 1 deletion apis/backupdr/v1alpha1/types.generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

257 changes: 0 additions & 257 deletions apis/backupdr/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion apis/backupdr/v1beta1/backupplan_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package v1alpha1
package v1beta1

import (
"context"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package v1alpha1
package v1beta1

import (
"context"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An improvement is to use the parent.ProjectAndLocation. I have a gemini guide to do it (and other resources). I plan to track that as a separate effort.

// +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 {
Expand Down Expand Up @@ -140,14 +151,15 @@ 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'"
// +kubebuilder:printcolumn:name="Status Age",JSONPath=".status.conditions[?(@.type=='Ready')].lastTransitionTime",type="date",description="The last transition time for the value in 'Status'"

// 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"`
Expand Down
4 changes: 3 additions & 1 deletion apis/backupdr/v1beta1/generate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
1 change: 1 addition & 0 deletions apis/backupdr/v1beta1/types.generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading