From d75ce114c5cb1291a4ca1a5a1301623afa964217 Mon Sep 17 00:00:00 2001 From: Jason Vigil Date: Tue, 1 Oct 2024 18:03:43 +0000 Subject: [PATCH] fix: Fix ResourceID field optional tag format --- apis/bigquery/v1beta1/bigquerydataset_types.go | 2 +- apis/bigqueryconnection/v1alpha1/connection_types.go | 2 +- .../v1alpha1/bigquerydatatransferconfig_types.go | 2 +- apis/bigtable/v1beta1/bigtableinstance_types.go | 2 +- apis/cloudbuild/v1beta1/workerpool_types.go | 2 +- apis/firestore/v1alpha1/firestoredatabase_types.go | 2 +- .../networkconnectivityserviceconnectionpolicy_types.go | 2 +- apis/redis/v1alpha1/rediscluster_types.go | 2 +- apis/secretmanager/v1beta1/secretmanagersecret_types.go | 2 +- apis/workstations/v1alpha1/workstationcluster_types.go | 2 +- dev/tools/controllerbuilder/template/apis/types.go | 2 +- pkg/apis/common/v1alpha1/types.go | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/apis/bigquery/v1beta1/bigquerydataset_types.go b/apis/bigquery/v1beta1/bigquerydataset_types.go index 7ad0e5ae3a..4b62d2a07e 100644 --- a/apis/bigquery/v1beta1/bigquerydataset_types.go +++ b/apis/bigquery/v1beta1/bigquerydataset_types.go @@ -28,7 +28,7 @@ var BigQueryDatasetGVK = GroupVersion.WithKind("BigQueryDataset") // +kcc:proto=google.cloud.bigquery.v2.dataset type BigQueryDatasetSpec struct { // The BigQueryDataset name. If not given, the metadata.name will be used. - // + optional + // +optional ResourceID *string `json:"resourceID,omitempty"` // An array of objects that define dataset access for one or more entities. diff --git a/apis/bigqueryconnection/v1alpha1/connection_types.go b/apis/bigqueryconnection/v1alpha1/connection_types.go index e0dc1733ff..d74ff3ebe5 100644 --- a/apis/bigqueryconnection/v1alpha1/connection_types.go +++ b/apis/bigqueryconnection/v1alpha1/connection_types.go @@ -39,7 +39,7 @@ type BigQueryConnectionConnectionSpec struct { // The BigQuery ConnectionID. This is a server-generated ID in the UUID format. // If not provided, ConfigConnector will create a new Connection and store the UUID in `status.serviceGeneratedID` field. - // + optional + // +optional ResourceID *string `json:"resourceID,omitempty"` // User provided display name for the connection. diff --git a/apis/bigquerydatatransfer/v1alpha1/bigquerydatatransferconfig_types.go b/apis/bigquerydatatransfer/v1alpha1/bigquerydatatransferconfig_types.go index 8243b236d5..6474e96271 100644 --- a/apis/bigquerydatatransfer/v1alpha1/bigquerydatatransferconfig_types.go +++ b/apis/bigquerydatatransfer/v1alpha1/bigquerydatatransferconfig_types.go @@ -85,7 +85,7 @@ type BigQueryDataTransferConfigSpec struct { // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="ResourceID field is immutable" // Immutable. // The BigQueryDataTransferConfig name. If not given, the metadata.name will be used. - // + optional + // +optional ResourceID *string `json:"resourceID,omitempty"` // Data transfer schedule. diff --git a/apis/bigtable/v1beta1/bigtableinstance_types.go b/apis/bigtable/v1beta1/bigtableinstance_types.go index c1c6fbedde..9214ecb580 100644 --- a/apis/bigtable/v1beta1/bigtableinstance_types.go +++ b/apis/bigtable/v1beta1/bigtableinstance_types.go @@ -28,7 +28,7 @@ var ( // +kcc:proto=google.bigtable.admin.v2.Instance type BigtableInstanceSpec struct { // The Instance name. If not given, the metadata.name will be used. - // + optional + // +optional ResourceID *string `json:"resourceID,omitempty"` // // The unique name of the instance. Values are of the form diff --git a/apis/cloudbuild/v1beta1/workerpool_types.go b/apis/cloudbuild/v1beta1/workerpool_types.go index 0853ac1f11..03496fc117 100644 --- a/apis/cloudbuild/v1beta1/workerpool_types.go +++ b/apis/cloudbuild/v1beta1/workerpool_types.go @@ -32,7 +32,7 @@ type CloudBuildWorkerPoolSpec struct { DisplayName string `json:"displayName,omitempty"` // The `WorkerPool` name. If not given, the metadata.name will be used. - // + optional + // +optional ResourceID *string `json:"resourceID,omitempty"` // +required diff --git a/apis/firestore/v1alpha1/firestoredatabase_types.go b/apis/firestore/v1alpha1/firestoredatabase_types.go index bc3c66b1a5..26d357e7a4 100644 --- a/apis/firestore/v1alpha1/firestoredatabase_types.go +++ b/apis/firestore/v1alpha1/firestoredatabase_types.go @@ -32,7 +32,7 @@ type FirestoreDatabaseSpec struct { ProjectRef v1beta1.ProjectRef `json:"projectRef"` // The FirestoreDatabase name. If not given, the metadata.name will be used. - // + optional + // +optional ResourceID *string `json:"resourceID,omitempty"` // The location of the database. Available locations are listed at diff --git a/apis/networkconnectivity/v1alpha1/networkconnectivityserviceconnectionpolicy_types.go b/apis/networkconnectivity/v1alpha1/networkconnectivityserviceconnectionpolicy_types.go index 3f161cfeea..73021219ed 100644 --- a/apis/networkconnectivity/v1alpha1/networkconnectivityserviceconnectionpolicy_types.go +++ b/apis/networkconnectivity/v1alpha1/networkconnectivityserviceconnectionpolicy_types.go @@ -40,7 +40,7 @@ type NetworkConnectivityServiceConnectionPolicySpec struct { Location *string `json:"location"` // The NetworkConnectivityServiceConnectionPolicy name. If not given, the metadata.name will be used. - // + optional + // +optional ResourceID *string `json:"resourceID,omitempty"` // A description of this resource. diff --git a/apis/redis/v1alpha1/rediscluster_types.go b/apis/redis/v1alpha1/rediscluster_types.go index 6d5783331b..2325920bcb 100644 --- a/apis/redis/v1alpha1/rediscluster_types.go +++ b/apis/redis/v1alpha1/rediscluster_types.go @@ -33,7 +33,7 @@ type RedisClusterSpec struct { Location *string `json:"location"` // The RedisCluster name. If not given, the metadata.name will be used. - // + optional + // +optional ResourceID *string `json:"resourceID,omitempty"` // Optional. The authorization mode of the Redis cluster. diff --git a/apis/secretmanager/v1beta1/secretmanagersecret_types.go b/apis/secretmanager/v1beta1/secretmanagersecret_types.go index d128b52155..0b94bc7f3d 100644 --- a/apis/secretmanager/v1beta1/secretmanagersecret_types.go +++ b/apis/secretmanager/v1beta1/secretmanagersecret_types.go @@ -31,7 +31,7 @@ type SecretManagerSecretSpec struct { // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="ResourceID field is immutable" // Immutable. // The SecretManagerSecret name. If not given, the metadata.name will be used. - // + optional + // +optional ResourceID *string `json:"resourceID,omitempty"` // Optional. Immutable. The replication policy of the secret data attached to diff --git a/apis/workstations/v1alpha1/workstationcluster_types.go b/apis/workstations/v1alpha1/workstationcluster_types.go index c93e10a8e9..74bd1412b7 100644 --- a/apis/workstations/v1alpha1/workstationcluster_types.go +++ b/apis/workstations/v1alpha1/workstationcluster_types.go @@ -39,7 +39,7 @@ type WorkstationClusterSpec struct { // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="ResourceID field is immutable" // Immutable. // The WorkstationCluster name. If not given, the metadata.name will be used. - // + optional + // +optional ResourceID *string `json:"resourceID,omitempty"` // Optional. Human-readable name for this workstation cluster. diff --git a/dev/tools/controllerbuilder/template/apis/types.go b/dev/tools/controllerbuilder/template/apis/types.go index 046eab7923..622e4db9c5 100644 --- a/dev/tools/controllerbuilder/template/apis/types.go +++ b/dev/tools/controllerbuilder/template/apis/types.go @@ -43,7 +43,7 @@ type {{ .Kind }}Spec struct { // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="ResourceID field is immutable" // Immutable. // The {{ .Kind }} name. If not given, the metadata.name will be used. - // + optional + // +optional ResourceID *string ` + "`" + `json:"resourceID,omitempty"` + "`" + ` } diff --git a/pkg/apis/common/v1alpha1/types.go b/pkg/apis/common/v1alpha1/types.go index e363182f9c..91a1df7ee1 100644 --- a/pkg/apis/common/v1alpha1/types.go +++ b/pkg/apis/common/v1alpha1/types.go @@ -21,7 +21,7 @@ import ( type CommonSpec struct { // The GCP resource identifier. If not given, the metadata.name will be used. - // + optional + // +optional ResourceID *string `json:"resourceID,omitempty"` // TODO: Do we still need a CommonSpec for resources that do not need project dependency? Those seems to be exceptional any ways.