From e4d2f727fcf975fd2758d036bf8c54816f224adc Mon Sep 17 00:00:00 2001 From: Yuwen Ma Date: Fri, 7 Jun 2024 10:21:08 +0000 Subject: [PATCH] move cloudbuildworkerpool to alpha; other crd changes --- .../{v1beta1 => v1alpha1}/conversion.go | 2 +- .../groupversion_info.go | 6 +- .../{v1beta1 => v1alpha1}/workerpool_types.go | 19 +- .../zz_generated.deepcopy.go | 30 +- apis/refs/v1beta1/networkref.go | 2 +- ...ools.cloudbuild.cnrm.cloud.google.com.yaml | 20 +- .../cloudbuildworkerpool_types.go | 18 +- .../generated/apis/cloudbuild/v1alpha1/doc.go | 41 +++ .../apis/cloudbuild/v1alpha1/register.go | 63 ++++ .../v1alpha1/zz_generated.deepcopy.go | 324 ++++++++++++++++++ .../apis/cloudbuild/v1beta1/register.go | 6 - .../v1beta1/zz_generated.deepcopy.go | 294 ---------------- .../client/clientset/versioned/clientset.go | 13 + .../versioned/fake/clientset_generated.go | 7 + .../clientset/versioned/fake/register.go | 2 + .../clientset/versioned/scheme/register.go | 2 + .../cloudbuild/v1alpha1/cloudbuild_client.go | 110 ++++++ .../cloudbuildworkerpool.go | 42 +-- .../typed/cloudbuild/v1alpha1/doc.go | 23 ++ .../typed/cloudbuild/v1alpha1/fake/doc.go | 23 ++ .../v1alpha1/fake/fake_cloudbuild_client.go | 43 +++ .../fake/fake_cloudbuildworkerpool.go | 50 +-- .../v1alpha1/generated_expansion.go | 24 ++ .../cloudbuild/v1beta1/cloudbuild_client.go | 5 - .../v1beta1/fake/fake_cloudbuild_client.go | 4 - .../cloudbuild/v1beta1/generated_expansion.go | 2 - .../cloudbuild/workerpool_controller.go | 21 +- .../direct/references/computenetworkref.go | 2 +- ...ed_object_cloudbuildworkerpool.golden.yaml | 6 +- .../cloudbuildworkerpool/_http.log | 12 +- .../cloudbuildworkerpool/create.yaml | 2 +- .../cloudbuildworkerpool/dependencies.yaml | 0 .../cloudbuildworkerpool/update.yaml | 2 +- scripts/github-actions/tests-e2e-direct.sh | 9 +- 34 files changed, 799 insertions(+), 430 deletions(-) rename apis/cloudbuild/{v1beta1 => v1alpha1}/conversion.go (99%) rename apis/cloudbuild/{v1beta1 => v1alpha1}/groupversion_info.go (90%) rename apis/cloudbuild/{v1beta1 => v1alpha1}/workerpool_types.go (99%) rename apis/cloudbuild/{v1beta1 => v1alpha1}/zz_generated.deepcopy.go (96%) rename pkg/clients/generated/apis/cloudbuild/{v1beta1 => v1alpha1}/cloudbuildworkerpool_types.go (99%) create mode 100644 pkg/clients/generated/apis/cloudbuild/v1alpha1/doc.go create mode 100644 pkg/clients/generated/apis/cloudbuild/v1alpha1/register.go create mode 100644 pkg/clients/generated/apis/cloudbuild/v1alpha1/zz_generated.deepcopy.go create mode 100644 pkg/clients/generated/client/clientset/versioned/typed/cloudbuild/v1alpha1/cloudbuild_client.go rename pkg/clients/generated/client/clientset/versioned/typed/cloudbuild/{v1beta1 => v1alpha1}/cloudbuildworkerpool.go (77%) create mode 100644 pkg/clients/generated/client/clientset/versioned/typed/cloudbuild/v1alpha1/doc.go create mode 100644 pkg/clients/generated/client/clientset/versioned/typed/cloudbuild/v1alpha1/fake/doc.go create mode 100644 pkg/clients/generated/client/clientset/versioned/typed/cloudbuild/v1alpha1/fake/fake_cloudbuild_client.go rename pkg/clients/generated/client/clientset/versioned/typed/cloudbuild/{v1beta1 => v1alpha1}/fake/fake_cloudbuildworkerpool.go (69%) create mode 100644 pkg/clients/generated/client/clientset/versioned/typed/cloudbuild/v1alpha1/generated_expansion.go rename pkg/test/resourcefixture/testdata/basic/cloudbuild/{v1beta1 => v1alpha1}/cloudbuildworkerpool/_generated_object_cloudbuildworkerpool.golden.yaml (89%) rename pkg/test/resourcefixture/testdata/basic/cloudbuild/{v1beta1 => v1alpha1}/cloudbuildworkerpool/_http.log (98%) rename pkg/test/resourcefixture/testdata/basic/cloudbuild/{v1beta1 => v1alpha1}/cloudbuildworkerpool/create.yaml (95%) rename pkg/test/resourcefixture/testdata/basic/cloudbuild/{v1beta1 => v1alpha1}/cloudbuildworkerpool/dependencies.yaml (100%) rename pkg/test/resourcefixture/testdata/basic/cloudbuild/{v1beta1 => v1alpha1}/cloudbuildworkerpool/update.yaml (95%) diff --git a/apis/cloudbuild/v1beta1/conversion.go b/apis/cloudbuild/v1alpha1/conversion.go similarity index 99% rename from apis/cloudbuild/v1beta1/conversion.go rename to apis/cloudbuild/v1alpha1/conversion.go index 221f574b40f..d47c3dc00ed 100644 --- a/apis/cloudbuild/v1beta1/conversion.go +++ b/apis/cloudbuild/v1alpha1/conversion.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package v1beta1 +package v1alpha1 import ( "fmt" diff --git a/apis/cloudbuild/v1beta1/groupversion_info.go b/apis/cloudbuild/v1alpha1/groupversion_info.go similarity index 90% rename from apis/cloudbuild/v1beta1/groupversion_info.go rename to apis/cloudbuild/v1alpha1/groupversion_info.go index beb921019fd..c55dd0b164d 100644 --- a/apis/cloudbuild/v1beta1/groupversion_info.go +++ b/apis/cloudbuild/v1alpha1/groupversion_info.go @@ -14,10 +14,10 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Package v1beta1 contains API Schema definitions for the cloudbuild v1beta1 API group +// Package v1alpha1 contains API Schema definitions for the cloudbuild v1alpha1 API group // +kubebuilder:object:generate=true // +groupName=cloudbuild.cnrm.cloud.google.com -package v1beta1 +package v1alpha1 import ( "k8s.io/apimachinery/pkg/runtime/schema" @@ -26,7 +26,7 @@ import ( var ( // GroupVersion is group version used to register these objects - GroupVersion = schema.GroupVersion{Group: "cloudbuild.cnrm.cloud.google.com", Version: "v1beta1"} + GroupVersion = schema.GroupVersion{Group: "cloudbuild.cnrm.cloud.google.com", Version: "v1alpha1"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} diff --git a/apis/cloudbuild/v1beta1/workerpool_types.go b/apis/cloudbuild/v1alpha1/workerpool_types.go similarity index 99% rename from apis/cloudbuild/v1beta1/workerpool_types.go rename to apis/cloudbuild/v1alpha1/workerpool_types.go index 97ed3d8161d..b98f8842a70 100644 --- a/apis/cloudbuild/v1beta1/workerpool_types.go +++ b/apis/cloudbuild/v1alpha1/workerpool_types.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1beta1 +package v1alpha1 import ( refv1beta1 "github.com/GoogleCloudPlatform/k8s-config-connector/apis/refs/v1beta1" @@ -68,6 +68,14 @@ type CloudBuildWorkerPoolStatus struct { // +optional ObservedGeneration *int64 `json:"observedGeneration,omitempty"` + ResourceID *string `json:"resourceID,omitempty"` + + /* ObservedState is the state of the resource as most recently observed in GCP. */ + // +optional + ObservedState *CloudBuildWorkerPoolObservedState `json:"observedState,omitempty"` +} + +type CloudBuildWorkerPoolObservedState struct { /* The creation timestamp of the workerpool.*/ // +optional // +kubebuilder:validation:Format=date-time @@ -77,15 +85,6 @@ type CloudBuildWorkerPoolStatus struct { // +optional // +kubebuilder:validation:Format=date-time UpdateTime *string `json:"updateTime,omitempty"` - - ResourceID *string `json:"resourceID,omitempty"` - - /* ObservedState is the state of the resource as most recently observed in GCP. */ - // +optional - ObservedState *CloudBuildWorkerPoolObservedState `json:"observedState,omitempty"` -} - -type CloudBuildWorkerPoolObservedState struct { // +required WorkerConfig *WorkerConfig `json:"workerConfig,omitempty"` NetworkConfig *NetworkConfigState `json:"networkConfig,omitempty"` diff --git a/apis/cloudbuild/v1beta1/zz_generated.deepcopy.go b/apis/cloudbuild/v1alpha1/zz_generated.deepcopy.go similarity index 96% rename from apis/cloudbuild/v1beta1/zz_generated.deepcopy.go rename to apis/cloudbuild/v1alpha1/zz_generated.deepcopy.go index fcfa9c15c0a..4c688371a1e 100644 --- a/apis/cloudbuild/v1beta1/zz_generated.deepcopy.go +++ b/apis/cloudbuild/v1alpha1/zz_generated.deepcopy.go @@ -2,11 +2,11 @@ // Code generated by controller-gen. DO NOT EDIT. -package v1beta1 +package v1alpha1 import ( - refsv1beta1 "github.com/GoogleCloudPlatform/k8s-config-connector/apis/refs/v1beta1" - "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/apis/k8s/v1alpha1" + "github.com/GoogleCloudPlatform/k8s-config-connector/apis/refs/v1beta1" + k8sv1alpha1 "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/apis/k8s/v1alpha1" runtime "k8s.io/apimachinery/pkg/runtime" ) @@ -72,6 +72,16 @@ func (in *CloudBuildWorkerPoolList) DeepCopyObject() runtime.Object { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *CloudBuildWorkerPoolObservedState) DeepCopyInto(out *CloudBuildWorkerPoolObservedState) { *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.WorkerConfig != nil { in, out := &in.WorkerConfig, &out.WorkerConfig *out = new(WorkerConfig) @@ -104,7 +114,7 @@ func (in *CloudBuildWorkerPoolSpec) DeepCopyInto(out *CloudBuildWorkerPoolSpec) } if in.ProjectRef != nil { in, out := &in.ProjectRef, &out.ProjectRef - *out = new(refsv1beta1.ProjectRef) + *out = new(v1beta1.ProjectRef) **out = **in } if in.PrivatePoolConfig != nil { @@ -129,7 +139,7 @@ func (in *CloudBuildWorkerPoolStatus) DeepCopyInto(out *CloudBuildWorkerPoolStat *out = *in if in.Conditions != nil { in, out := &in.Conditions, &out.Conditions - *out = make([]v1alpha1.Condition, len(*in)) + *out = make([]k8sv1alpha1.Condition, len(*in)) copy(*out, *in) } if in.ObservedGeneration != nil { @@ -137,16 +147,6 @@ func (in *CloudBuildWorkerPoolStatus) DeepCopyInto(out *CloudBuildWorkerPoolStat *out = new(int64) **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.ResourceID != nil { in, out := &in.ResourceID, &out.ResourceID *out = new(string) diff --git a/apis/refs/v1beta1/networkref.go b/apis/refs/v1beta1/networkref.go index 623b2213e93..7bd504db5f5 100644 --- a/apis/refs/v1beta1/networkref.go +++ b/apis/refs/v1beta1/networkref.go @@ -19,6 +19,6 @@ type ComputeNetworkRef struct { External string `json:"external,omitempty"` /* The `name` field of a `ComputeNetwork` resource. */ Name string `json:"name,omitempty"` - /* The `namespcae` field of a `ComputeNetwork` resource. */ + /* The `namespace` field of a `ComputeNetwork` resource. */ Namespace string `json:"namespace,omitempty"` } diff --git a/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_cloudbuildworkerpools.cloudbuild.cnrm.cloud.google.com.yaml b/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_cloudbuildworkerpools.cloudbuild.cnrm.cloud.google.com.yaml index 1f942f98221..2fc2ff23ded 100644 --- a/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_cloudbuildworkerpools.cloudbuild.cnrm.cloud.google.com.yaml +++ b/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_cloudbuildworkerpools.cloudbuild.cnrm.cloud.google.com.yaml @@ -18,7 +18,7 @@ spec: preserveUnknownFields: false scope: Namespaced versions: - - name: v1beta1 + - name: v1alpha1 schema: openAPIV3Schema: description: CloudBuildWorkerPool is the Schema for the CloudBuild WorkerPool @@ -77,7 +77,7 @@ spec: description: The `name` field of a `ComputeNetwork` resource. type: string namespace: - description: The `namespcae` field of a `ComputeNetwork` + description: The `namespace` field of a `ComputeNetwork` resource. type: string type: object @@ -164,10 +164,6 @@ spec: type: string type: object type: array - createTime: - description: The creation timestamp of the workerpool. - format: date-time - type: string observedGeneration: description: ObservedGeneration is the generation of the resource that was most recently observed by the Config Connector controller. @@ -180,6 +176,10 @@ spec: description: ObservedState is the state of the resource as most recently observed in GCP. properties: + createTime: + description: The creation timestamp of the workerpool. + format: date-time + type: string networkConfig: properties: egressOption: @@ -189,6 +189,10 @@ spec: peeredNetworkIpRange: type: string type: object + updateTime: + description: The last update timestamp of the workerpool. + format: date-time + type: string workerConfig: properties: diskSizeGb: @@ -202,10 +206,6 @@ spec: type: object resourceID: type: string - updateTime: - description: The last update timestamp of the workerpool. - format: date-time - type: string type: object type: object served: true diff --git a/pkg/clients/generated/apis/cloudbuild/v1beta1/cloudbuildworkerpool_types.go b/pkg/clients/generated/apis/cloudbuild/v1alpha1/cloudbuildworkerpool_types.go similarity index 99% rename from pkg/clients/generated/apis/cloudbuild/v1beta1/cloudbuildworkerpool_types.go rename to pkg/clients/generated/apis/cloudbuild/v1alpha1/cloudbuildworkerpool_types.go index 0469b8e382d..19a5a299241 100644 --- a/pkg/clients/generated/apis/cloudbuild/v1beta1/cloudbuildworkerpool_types.go +++ b/pkg/clients/generated/apis/cloudbuild/v1alpha1/cloudbuildworkerpool_types.go @@ -28,7 +28,7 @@ // that future versions of the go-client may include breaking changes. // Please try it out and give us feedback! -package v1beta1 +package v1alpha1 import ( "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/apis/k8s/v1alpha1" @@ -90,9 +90,17 @@ type WorkerpoolNetworkConfigStatus struct { } type WorkerpoolObservedStateStatus struct { + /* The creation timestamp of the workerpool. */ + // +optional + CreateTime *string `json:"createTime,omitempty"` + // +optional NetworkConfig *WorkerpoolNetworkConfigStatus `json:"networkConfig,omitempty"` + /* The last update timestamp of the workerpool. */ + // +optional + UpdateTime *string `json:"updateTime,omitempty"` + WorkerConfig WorkerpoolWorkerConfigStatus `json:"workerConfig"` } @@ -108,10 +116,6 @@ type CloudBuildWorkerPoolStatus struct { /* Conditions represent the latest available observations of the CloudBuildWorkerPool's current state. */ Conditions []v1alpha1.Condition `json:"conditions,omitempty"` - /* The creation timestamp of the workerpool. */ - // +optional - CreateTime *string `json:"createTime,omitempty"` - /* 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. */ // +optional ObservedGeneration *int64 `json:"observedGeneration,omitempty"` @@ -122,10 +126,6 @@ type CloudBuildWorkerPoolStatus struct { // +optional ResourceID *string `json:"resourceID,omitempty"` - - /* The last update timestamp of the workerpool. */ - // +optional - UpdateTime *string `json:"updateTime,omitempty"` } // +genclient diff --git a/pkg/clients/generated/apis/cloudbuild/v1alpha1/doc.go b/pkg/clients/generated/apis/cloudbuild/v1alpha1/doc.go new file mode 100644 index 00000000000..db56cfeb988 --- /dev/null +++ b/pkg/clients/generated/apis/cloudbuild/v1alpha1/doc.go @@ -0,0 +1,41 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// ---------------------------------------------------------------------------- +// +// *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** +// +// ---------------------------------------------------------------------------- +// +// This file is automatically generated by Config Connector and manual +// changes will be clobbered when the file is regenerated. +// +// ---------------------------------------------------------------------------- + +// *** DISCLAIMER *** +// Config Connector's go-client for CRDs is currently in ALPHA, which means +// that future versions of the go-client may include breaking changes. +// Please try it out and give us feedback! + +// Package v1alpha1 contains API Schema definitions for the cloudbuild v1alpha1 API group. +// +k8s:openapi-gen=true +// +k8s:deepcopy-gen=package,register +// +k8s:conversion-gen=github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/pkg/apis/cloudbuild +// +k8s:defaulter-gen=TypeMeta +// +groupName=cloudbuild.cnrm.cloud.google.com + +// Generate deepcopy object for cloudbuild/v1alpha1 API group +// +//go:generate go run ../../../../../../scripts/deepcopy-gen/main.go -O zz_generated.deepcopy -i . -h ../../../../../../hack/boilerplate_client_alpha.go.txt +package v1alpha1 diff --git a/pkg/clients/generated/apis/cloudbuild/v1alpha1/register.go b/pkg/clients/generated/apis/cloudbuild/v1alpha1/register.go new file mode 100644 index 00000000000..a195a0de03a --- /dev/null +++ b/pkg/clients/generated/apis/cloudbuild/v1alpha1/register.go @@ -0,0 +1,63 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// ---------------------------------------------------------------------------- +// +// *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** +// +// ---------------------------------------------------------------------------- +// +// This file is automatically generated by Config Connector and manual +// changes will be clobbered when the file is regenerated. +// +// ---------------------------------------------------------------------------- + +// *** DISCLAIMER *** +// Config Connector's go-client for CRDs is currently in ALPHA, which means +// that future versions of the go-client may include breaking changes. +// Please try it out and give us feedback! + +// Package v1alpha1 contains API Schema definitions for the cloudbuild v1alpha1 API group. +// +k8s:openapi-gen=true +// +k8s:deepcopy-gen=package,register +// +k8s:conversion-gen=github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/pkg/apis/cloudbuild +// +k8s:defaulter-gen=TypeMeta +// +groupName=cloudbuild.cnrm.cloud.google.com +package v1alpha1 + +import ( + "reflect" + + "k8s.io/apimachinery/pkg/runtime/schema" + "sigs.k8s.io/controller-runtime/pkg/scheme" +) + +var ( + // SchemeGroupVersion is the group version used to register these objects. + SchemeGroupVersion = schema.GroupVersion{Group: "cloudbuild.cnrm.cloud.google.com", Version: "v1alpha1"} + + // SchemeBuilder is used to add go types to the GroupVersionKind scheme. + SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion} + + // AddToScheme is a global function that registers this API group & version to a scheme + AddToScheme = SchemeBuilder.AddToScheme + + CloudBuildWorkerPoolGVK = schema.GroupVersionKind{ + Group: SchemeGroupVersion.Group, + Version: SchemeGroupVersion.Version, + Kind: reflect.TypeOf(CloudBuildWorkerPool{}).Name(), + } + + cloudbuildAPIVersion = SchemeGroupVersion.String() +) diff --git a/pkg/clients/generated/apis/cloudbuild/v1alpha1/zz_generated.deepcopy.go b/pkg/clients/generated/apis/cloudbuild/v1alpha1/zz_generated.deepcopy.go new file mode 100644 index 00000000000..ba89cb99dca --- /dev/null +++ b/pkg/clients/generated/apis/cloudbuild/v1alpha1/zz_generated.deepcopy.go @@ -0,0 +1,324 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// *** DISCLAIMER *** +// Config Connector's go-client for CRDs is currently in ALPHA, which means +// that future versions of the go-client may include breaking changes. +// Please try it out and give us feedback! + +// Code generated by main. DO NOT EDIT. + +package v1alpha1 + +import ( + k8sv1alpha1 "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/apis/k8s/v1alpha1" + 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 *CloudBuildWorkerPool) DeepCopyInto(out *CloudBuildWorkerPool) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CloudBuildWorkerPool. +func (in *CloudBuildWorkerPool) DeepCopy() *CloudBuildWorkerPool { + if in == nil { + return nil + } + out := new(CloudBuildWorkerPool) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *CloudBuildWorkerPool) 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 *CloudBuildWorkerPoolList) DeepCopyInto(out *CloudBuildWorkerPoolList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]CloudBuildWorkerPool, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CloudBuildWorkerPoolList. +func (in *CloudBuildWorkerPoolList) DeepCopy() *CloudBuildWorkerPoolList { + if in == nil { + return nil + } + out := new(CloudBuildWorkerPoolList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *CloudBuildWorkerPoolList) 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 *CloudBuildWorkerPoolSpec) DeepCopyInto(out *CloudBuildWorkerPoolSpec) { + *out = *in + if in.DisplayName != nil { + in, out := &in.DisplayName, &out.DisplayName + *out = new(string) + **out = **in + } + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + in.PrivatePoolV1Config.DeepCopyInto(&out.PrivatePoolV1Config) + out.ProjectRef = in.ProjectRef + if in.ResourceID != nil { + in, out := &in.ResourceID, &out.ResourceID + *out = new(string) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CloudBuildWorkerPoolSpec. +func (in *CloudBuildWorkerPoolSpec) DeepCopy() *CloudBuildWorkerPoolSpec { + if in == nil { + return nil + } + out := new(CloudBuildWorkerPoolSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *CloudBuildWorkerPoolStatus) DeepCopyInto(out *CloudBuildWorkerPoolStatus) { + *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.ObservedState != nil { + in, out := &in.ObservedState, &out.ObservedState + *out = new(WorkerpoolObservedStateStatus) + (*in).DeepCopyInto(*out) + } + if in.ResourceID != nil { + in, out := &in.ResourceID, &out.ResourceID + *out = new(string) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CloudBuildWorkerPoolStatus. +func (in *CloudBuildWorkerPoolStatus) DeepCopy() *CloudBuildWorkerPoolStatus { + if in == nil { + return nil + } + out := new(CloudBuildWorkerPoolStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *WorkerpoolNetworkConfig) DeepCopyInto(out *WorkerpoolNetworkConfig) { + *out = *in + if in.EgressOption != nil { + in, out := &in.EgressOption, &out.EgressOption + *out = new(string) + **out = **in + } + if in.PeeredNetworkIpRange != nil { + in, out := &in.PeeredNetworkIpRange, &out.PeeredNetworkIpRange + *out = new(string) + **out = **in + } + out.PeeredNetworkRef = in.PeeredNetworkRef + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkerpoolNetworkConfig. +func (in *WorkerpoolNetworkConfig) DeepCopy() *WorkerpoolNetworkConfig { + if in == nil { + return nil + } + out := new(WorkerpoolNetworkConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *WorkerpoolNetworkConfigStatus) DeepCopyInto(out *WorkerpoolNetworkConfigStatus) { + *out = *in + if in.EgressOption != nil { + in, out := &in.EgressOption, &out.EgressOption + *out = new(string) + **out = **in + } + if in.PeeredNetwork != nil { + in, out := &in.PeeredNetwork, &out.PeeredNetwork + *out = new(string) + **out = **in + } + if in.PeeredNetworkIpRange != nil { + in, out := &in.PeeredNetworkIpRange, &out.PeeredNetworkIpRange + *out = new(string) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkerpoolNetworkConfigStatus. +func (in *WorkerpoolNetworkConfigStatus) DeepCopy() *WorkerpoolNetworkConfigStatus { + if in == nil { + return nil + } + out := new(WorkerpoolNetworkConfigStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *WorkerpoolObservedStateStatus) DeepCopyInto(out *WorkerpoolObservedStateStatus) { + *out = *in + if in.CreateTime != nil { + in, out := &in.CreateTime, &out.CreateTime + *out = new(string) + **out = **in + } + if in.NetworkConfig != nil { + in, out := &in.NetworkConfig, &out.NetworkConfig + *out = new(WorkerpoolNetworkConfigStatus) + (*in).DeepCopyInto(*out) + } + if in.UpdateTime != nil { + in, out := &in.UpdateTime, &out.UpdateTime + *out = new(string) + **out = **in + } + in.WorkerConfig.DeepCopyInto(&out.WorkerConfig) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkerpoolObservedStateStatus. +func (in *WorkerpoolObservedStateStatus) DeepCopy() *WorkerpoolObservedStateStatus { + if in == nil { + return nil + } + out := new(WorkerpoolObservedStateStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *WorkerpoolPrivatePoolV1Config) DeepCopyInto(out *WorkerpoolPrivatePoolV1Config) { + *out = *in + if in.NetworkConfig != nil { + in, out := &in.NetworkConfig, &out.NetworkConfig + *out = new(WorkerpoolNetworkConfig) + (*in).DeepCopyInto(*out) + } + in.WorkerConfig.DeepCopyInto(&out.WorkerConfig) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkerpoolPrivatePoolV1Config. +func (in *WorkerpoolPrivatePoolV1Config) DeepCopy() *WorkerpoolPrivatePoolV1Config { + if in == nil { + return nil + } + out := new(WorkerpoolPrivatePoolV1Config) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *WorkerpoolWorkerConfig) DeepCopyInto(out *WorkerpoolWorkerConfig) { + *out = *in + if in.DiskSizeGb != nil { + in, out := &in.DiskSizeGb, &out.DiskSizeGb + *out = new(int64) + **out = **in + } + if in.MachineType != nil { + in, out := &in.MachineType, &out.MachineType + *out = new(string) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkerpoolWorkerConfig. +func (in *WorkerpoolWorkerConfig) DeepCopy() *WorkerpoolWorkerConfig { + if in == nil { + return nil + } + out := new(WorkerpoolWorkerConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *WorkerpoolWorkerConfigStatus) DeepCopyInto(out *WorkerpoolWorkerConfigStatus) { + *out = *in + if in.DiskSizeGb != nil { + in, out := &in.DiskSizeGb, &out.DiskSizeGb + *out = new(int64) + **out = **in + } + if in.MachineType != nil { + in, out := &in.MachineType, &out.MachineType + *out = new(string) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkerpoolWorkerConfigStatus. +func (in *WorkerpoolWorkerConfigStatus) DeepCopy() *WorkerpoolWorkerConfigStatus { + if in == nil { + return nil + } + out := new(WorkerpoolWorkerConfigStatus) + in.DeepCopyInto(out) + return out +} diff --git a/pkg/clients/generated/apis/cloudbuild/v1beta1/register.go b/pkg/clients/generated/apis/cloudbuild/v1beta1/register.go index e05640d08a5..0570d8665b1 100644 --- a/pkg/clients/generated/apis/cloudbuild/v1beta1/register.go +++ b/pkg/clients/generated/apis/cloudbuild/v1beta1/register.go @@ -59,11 +59,5 @@ var ( Kind: reflect.TypeOf(CloudBuildTrigger{}).Name(), } - CloudBuildWorkerPoolGVK = schema.GroupVersionKind{ - Group: SchemeGroupVersion.Group, - Version: SchemeGroupVersion.Version, - Kind: reflect.TypeOf(CloudBuildWorkerPool{}).Name(), - } - cloudbuildAPIVersion = SchemeGroupVersion.String() ) diff --git a/pkg/clients/generated/apis/cloudbuild/v1beta1/zz_generated.deepcopy.go b/pkg/clients/generated/apis/cloudbuild/v1beta1/zz_generated.deepcopy.go index 892850b4a3f..450c2a50e62 100644 --- a/pkg/clients/generated/apis/cloudbuild/v1beta1/zz_generated.deepcopy.go +++ b/pkg/clients/generated/apis/cloudbuild/v1beta1/zz_generated.deepcopy.go @@ -249,146 +249,6 @@ func (in *CloudBuildTriggerStatus) DeepCopy() *CloudBuildTriggerStatus { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CloudBuildWorkerPool) DeepCopyInto(out *CloudBuildWorkerPool) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CloudBuildWorkerPool. -func (in *CloudBuildWorkerPool) DeepCopy() *CloudBuildWorkerPool { - if in == nil { - return nil - } - out := new(CloudBuildWorkerPool) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *CloudBuildWorkerPool) 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 *CloudBuildWorkerPoolList) DeepCopyInto(out *CloudBuildWorkerPoolList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]CloudBuildWorkerPool, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CloudBuildWorkerPoolList. -func (in *CloudBuildWorkerPoolList) DeepCopy() *CloudBuildWorkerPoolList { - if in == nil { - return nil - } - out := new(CloudBuildWorkerPoolList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *CloudBuildWorkerPoolList) 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 *CloudBuildWorkerPoolSpec) DeepCopyInto(out *CloudBuildWorkerPoolSpec) { - *out = *in - if in.DisplayName != nil { - in, out := &in.DisplayName, &out.DisplayName - *out = new(string) - **out = **in - } - if in.Name != nil { - in, out := &in.Name, &out.Name - *out = new(string) - **out = **in - } - in.PrivatePoolV1Config.DeepCopyInto(&out.PrivatePoolV1Config) - out.ProjectRef = in.ProjectRef - if in.ResourceID != nil { - in, out := &in.ResourceID, &out.ResourceID - *out = new(string) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CloudBuildWorkerPoolSpec. -func (in *CloudBuildWorkerPoolSpec) DeepCopy() *CloudBuildWorkerPoolSpec { - if in == nil { - return nil - } - out := new(CloudBuildWorkerPoolSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CloudBuildWorkerPoolStatus) DeepCopyInto(out *CloudBuildWorkerPoolStatus) { - *out = *in - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]v1alpha1.Condition, len(*in)) - copy(*out, *in) - } - if in.CreateTime != nil { - in, out := &in.CreateTime, &out.CreateTime - *out = new(string) - **out = **in - } - if in.ObservedGeneration != nil { - in, out := &in.ObservedGeneration, &out.ObservedGeneration - *out = new(int64) - **out = **in - } - if in.ObservedState != nil { - in, out := &in.ObservedState, &out.ObservedState - *out = new(WorkerpoolObservedStateStatus) - (*in).DeepCopyInto(*out) - } - if in.ResourceID != nil { - in, out := &in.ResourceID, &out.ResourceID - *out = new(string) - **out = **in - } - if in.UpdateTime != nil { - in, out := &in.UpdateTime, &out.UpdateTime - *out = new(string) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CloudBuildWorkerPoolStatus. -func (in *CloudBuildWorkerPoolStatus) DeepCopy() *CloudBuildWorkerPoolStatus { - if in == nil { - return nil - } - out := new(CloudBuildWorkerPoolStatus) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *TriggerApprovalConfig) DeepCopyInto(out *TriggerApprovalConfig) { *out = *in @@ -1251,157 +1111,3 @@ func (in *TriggerWebhookConfig) DeepCopy() *TriggerWebhookConfig { in.DeepCopyInto(out) return out } - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *WorkerpoolNetworkConfig) DeepCopyInto(out *WorkerpoolNetworkConfig) { - *out = *in - if in.EgressOption != nil { - in, out := &in.EgressOption, &out.EgressOption - *out = new(string) - **out = **in - } - if in.PeeredNetworkIpRange != nil { - in, out := &in.PeeredNetworkIpRange, &out.PeeredNetworkIpRange - *out = new(string) - **out = **in - } - out.PeeredNetworkRef = in.PeeredNetworkRef - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkerpoolNetworkConfig. -func (in *WorkerpoolNetworkConfig) DeepCopy() *WorkerpoolNetworkConfig { - if in == nil { - return nil - } - out := new(WorkerpoolNetworkConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *WorkerpoolNetworkConfigStatus) DeepCopyInto(out *WorkerpoolNetworkConfigStatus) { - *out = *in - if in.EgressOption != nil { - in, out := &in.EgressOption, &out.EgressOption - *out = new(string) - **out = **in - } - if in.PeeredNetwork != nil { - in, out := &in.PeeredNetwork, &out.PeeredNetwork - *out = new(string) - **out = **in - } - if in.PeeredNetworkIpRange != nil { - in, out := &in.PeeredNetworkIpRange, &out.PeeredNetworkIpRange - *out = new(string) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkerpoolNetworkConfigStatus. -func (in *WorkerpoolNetworkConfigStatus) DeepCopy() *WorkerpoolNetworkConfigStatus { - if in == nil { - return nil - } - out := new(WorkerpoolNetworkConfigStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *WorkerpoolObservedStateStatus) DeepCopyInto(out *WorkerpoolObservedStateStatus) { - *out = *in - if in.NetworkConfig != nil { - in, out := &in.NetworkConfig, &out.NetworkConfig - *out = new(WorkerpoolNetworkConfigStatus) - (*in).DeepCopyInto(*out) - } - in.WorkerConfig.DeepCopyInto(&out.WorkerConfig) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkerpoolObservedStateStatus. -func (in *WorkerpoolObservedStateStatus) DeepCopy() *WorkerpoolObservedStateStatus { - if in == nil { - return nil - } - out := new(WorkerpoolObservedStateStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *WorkerpoolPrivatePoolV1Config) DeepCopyInto(out *WorkerpoolPrivatePoolV1Config) { - *out = *in - if in.NetworkConfig != nil { - in, out := &in.NetworkConfig, &out.NetworkConfig - *out = new(WorkerpoolNetworkConfig) - (*in).DeepCopyInto(*out) - } - in.WorkerConfig.DeepCopyInto(&out.WorkerConfig) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkerpoolPrivatePoolV1Config. -func (in *WorkerpoolPrivatePoolV1Config) DeepCopy() *WorkerpoolPrivatePoolV1Config { - if in == nil { - return nil - } - out := new(WorkerpoolPrivatePoolV1Config) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *WorkerpoolWorkerConfig) DeepCopyInto(out *WorkerpoolWorkerConfig) { - *out = *in - if in.DiskSizeGb != nil { - in, out := &in.DiskSizeGb, &out.DiskSizeGb - *out = new(int64) - **out = **in - } - if in.MachineType != nil { - in, out := &in.MachineType, &out.MachineType - *out = new(string) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkerpoolWorkerConfig. -func (in *WorkerpoolWorkerConfig) DeepCopy() *WorkerpoolWorkerConfig { - if in == nil { - return nil - } - out := new(WorkerpoolWorkerConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *WorkerpoolWorkerConfigStatus) DeepCopyInto(out *WorkerpoolWorkerConfigStatus) { - *out = *in - if in.DiskSizeGb != nil { - in, out := &in.DiskSizeGb, &out.DiskSizeGb - *out = new(int64) - **out = **in - } - if in.MachineType != nil { - in, out := &in.MachineType, &out.MachineType - *out = new(string) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkerpoolWorkerConfigStatus. -func (in *WorkerpoolWorkerConfigStatus) DeepCopy() *WorkerpoolWorkerConfigStatus { - if in == nil { - return nil - } - out := new(WorkerpoolWorkerConfigStatus) - in.DeepCopyInto(out) - return out -} diff --git a/pkg/clients/generated/client/clientset/versioned/clientset.go b/pkg/clients/generated/client/clientset/versioned/clientset.go index 32a1add47ae..97080f5197f 100644 --- a/pkg/clients/generated/client/clientset/versioned/clientset.go +++ b/pkg/clients/generated/client/clientset/versioned/clientset.go @@ -47,6 +47,7 @@ import ( binaryauthorizationv1beta1 "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/client/clientset/versioned/typed/binaryauthorization/v1beta1" certificatemanagerv1beta1 "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/client/clientset/versioned/typed/certificatemanager/v1beta1" cloudassetv1alpha1 "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/client/clientset/versioned/typed/cloudasset/v1alpha1" + cloudbuildv1alpha1 "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/client/clientset/versioned/typed/cloudbuild/v1alpha1" cloudbuildv1beta1 "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/client/clientset/versioned/typed/cloudbuild/v1beta1" cloudfunctionsv1beta1 "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/client/clientset/versioned/typed/cloudfunctions/v1beta1" cloudfunctions2v1alpha1 "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/client/clientset/versioned/typed/cloudfunctions2/v1alpha1" @@ -171,6 +172,7 @@ type Interface interface { BinaryauthorizationV1beta1() binaryauthorizationv1beta1.BinaryauthorizationV1beta1Interface CertificatemanagerV1beta1() certificatemanagerv1beta1.CertificatemanagerV1beta1Interface CloudassetV1alpha1() cloudassetv1alpha1.CloudassetV1alpha1Interface + CloudbuildV1alpha1() cloudbuildv1alpha1.CloudbuildV1alpha1Interface CloudbuildV1beta1() cloudbuildv1beta1.CloudbuildV1beta1Interface CloudfunctionsV1beta1() cloudfunctionsv1beta1.CloudfunctionsV1beta1Interface Cloudfunctions2V1alpha1() cloudfunctions2v1alpha1.Cloudfunctions2V1alpha1Interface @@ -293,6 +295,7 @@ type Clientset struct { binaryauthorizationV1beta1 *binaryauthorizationv1beta1.BinaryauthorizationV1beta1Client certificatemanagerV1beta1 *certificatemanagerv1beta1.CertificatemanagerV1beta1Client cloudassetV1alpha1 *cloudassetv1alpha1.CloudassetV1alpha1Client + cloudbuildV1alpha1 *cloudbuildv1alpha1.CloudbuildV1alpha1Client cloudbuildV1beta1 *cloudbuildv1beta1.CloudbuildV1beta1Client cloudfunctionsV1beta1 *cloudfunctionsv1beta1.CloudfunctionsV1beta1Client cloudfunctions2V1alpha1 *cloudfunctions2v1alpha1.Cloudfunctions2V1alpha1Client @@ -500,6 +503,11 @@ func (c *Clientset) CloudassetV1alpha1() cloudassetv1alpha1.CloudassetV1alpha1In return c.cloudassetV1alpha1 } +// CloudbuildV1alpha1 retrieves the CloudbuildV1alpha1Client +func (c *Clientset) CloudbuildV1alpha1() cloudbuildv1alpha1.CloudbuildV1alpha1Interface { + return c.cloudbuildV1alpha1 +} + // CloudbuildV1beta1 retrieves the CloudbuildV1beta1Client func (c *Clientset) CloudbuildV1beta1() cloudbuildv1beta1.CloudbuildV1beta1Interface { return c.cloudbuildV1beta1 @@ -1107,6 +1115,10 @@ func NewForConfigAndClient(c *rest.Config, httpClient *http.Client) (*Clientset, if err != nil { return nil, err } + cs.cloudbuildV1alpha1, err = cloudbuildv1alpha1.NewForConfigAndClient(&configShallowCopy, httpClient) + if err != nil { + return nil, err + } cs.cloudbuildV1beta1, err = cloudbuildv1beta1.NewForConfigAndClient(&configShallowCopy, httpClient) if err != nil { return nil, err @@ -1530,6 +1542,7 @@ func New(c rest.Interface) *Clientset { cs.binaryauthorizationV1beta1 = binaryauthorizationv1beta1.New(c) cs.certificatemanagerV1beta1 = certificatemanagerv1beta1.New(c) cs.cloudassetV1alpha1 = cloudassetv1alpha1.New(c) + cs.cloudbuildV1alpha1 = cloudbuildv1alpha1.New(c) cs.cloudbuildV1beta1 = cloudbuildv1beta1.New(c) cs.cloudfunctionsV1beta1 = cloudfunctionsv1beta1.New(c) cs.cloudfunctions2V1alpha1 = cloudfunctions2v1alpha1.New(c) diff --git a/pkg/clients/generated/client/clientset/versioned/fake/clientset_generated.go b/pkg/clients/generated/client/clientset/versioned/fake/clientset_generated.go index 5c1769388fd..18c95e3de33 100644 --- a/pkg/clients/generated/client/clientset/versioned/fake/clientset_generated.go +++ b/pkg/clients/generated/client/clientset/versioned/fake/clientset_generated.go @@ -67,6 +67,8 @@ import ( fakecertificatemanagerv1beta1 "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/client/clientset/versioned/typed/certificatemanager/v1beta1/fake" cloudassetv1alpha1 "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/client/clientset/versioned/typed/cloudasset/v1alpha1" fakecloudassetv1alpha1 "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/client/clientset/versioned/typed/cloudasset/v1alpha1/fake" + cloudbuildv1alpha1 "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/client/clientset/versioned/typed/cloudbuild/v1alpha1" + fakecloudbuildv1alpha1 "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/client/clientset/versioned/typed/cloudbuild/v1alpha1/fake" cloudbuildv1beta1 "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/client/clientset/versioned/typed/cloudbuild/v1beta1" fakecloudbuildv1beta1 "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/client/clientset/versioned/typed/cloudbuild/v1beta1/fake" cloudfunctionsv1beta1 "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/client/clientset/versioned/typed/cloudfunctions/v1beta1" @@ -424,6 +426,11 @@ func (c *Clientset) CloudassetV1alpha1() cloudassetv1alpha1.CloudassetV1alpha1In return &fakecloudassetv1alpha1.FakeCloudassetV1alpha1{Fake: &c.Fake} } +// CloudbuildV1alpha1 retrieves the CloudbuildV1alpha1Client +func (c *Clientset) CloudbuildV1alpha1() cloudbuildv1alpha1.CloudbuildV1alpha1Interface { + return &fakecloudbuildv1alpha1.FakeCloudbuildV1alpha1{Fake: &c.Fake} +} + // CloudbuildV1beta1 retrieves the CloudbuildV1beta1Client func (c *Clientset) CloudbuildV1beta1() cloudbuildv1beta1.CloudbuildV1beta1Interface { return &fakecloudbuildv1beta1.FakeCloudbuildV1beta1{Fake: &c.Fake} diff --git a/pkg/clients/generated/client/clientset/versioned/fake/register.go b/pkg/clients/generated/client/clientset/versioned/fake/register.go index e76c6b0ceca..6ff456abe75 100644 --- a/pkg/clients/generated/client/clientset/versioned/fake/register.go +++ b/pkg/clients/generated/client/clientset/versioned/fake/register.go @@ -44,6 +44,7 @@ import ( binaryauthorizationv1beta1 "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/apis/binaryauthorization/v1beta1" certificatemanagerv1beta1 "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/apis/certificatemanager/v1beta1" cloudassetv1alpha1 "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/apis/cloudasset/v1alpha1" + cloudbuildv1alpha1 "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/apis/cloudbuild/v1alpha1" cloudbuildv1beta1 "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/apis/cloudbuild/v1beta1" cloudfunctionsv1beta1 "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/apis/cloudfunctions/v1beta1" cloudfunctions2v1alpha1 "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/apis/cloudfunctions2/v1alpha1" @@ -172,6 +173,7 @@ var localSchemeBuilder = runtime.SchemeBuilder{ binaryauthorizationv1beta1.AddToScheme, certificatemanagerv1beta1.AddToScheme, cloudassetv1alpha1.AddToScheme, + cloudbuildv1alpha1.AddToScheme, cloudbuildv1beta1.AddToScheme, cloudfunctionsv1beta1.AddToScheme, cloudfunctions2v1alpha1.AddToScheme, diff --git a/pkg/clients/generated/client/clientset/versioned/scheme/register.go b/pkg/clients/generated/client/clientset/versioned/scheme/register.go index 652c5dbd72d..0eda9dfd9b5 100644 --- a/pkg/clients/generated/client/clientset/versioned/scheme/register.go +++ b/pkg/clients/generated/client/clientset/versioned/scheme/register.go @@ -44,6 +44,7 @@ import ( binaryauthorizationv1beta1 "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/apis/binaryauthorization/v1beta1" certificatemanagerv1beta1 "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/apis/certificatemanager/v1beta1" cloudassetv1alpha1 "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/apis/cloudasset/v1alpha1" + cloudbuildv1alpha1 "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/apis/cloudbuild/v1alpha1" cloudbuildv1beta1 "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/apis/cloudbuild/v1beta1" cloudfunctionsv1beta1 "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/apis/cloudfunctions/v1beta1" cloudfunctions2v1alpha1 "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/apis/cloudfunctions2/v1alpha1" @@ -172,6 +173,7 @@ var localSchemeBuilder = runtime.SchemeBuilder{ binaryauthorizationv1beta1.AddToScheme, certificatemanagerv1beta1.AddToScheme, cloudassetv1alpha1.AddToScheme, + cloudbuildv1alpha1.AddToScheme, cloudbuildv1beta1.AddToScheme, cloudfunctionsv1beta1.AddToScheme, cloudfunctions2v1alpha1.AddToScheme, diff --git a/pkg/clients/generated/client/clientset/versioned/typed/cloudbuild/v1alpha1/cloudbuild_client.go b/pkg/clients/generated/client/clientset/versioned/typed/cloudbuild/v1alpha1/cloudbuild_client.go new file mode 100644 index 00000000000..170d708e3b1 --- /dev/null +++ b/pkg/clients/generated/client/clientset/versioned/typed/cloudbuild/v1alpha1/cloudbuild_client.go @@ -0,0 +1,110 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// *** DISCLAIMER *** +// Config Connector's go-client for CRDs is currently in ALPHA, which means +// that future versions of the go-client may include breaking changes. +// Please try it out and give us feedback! + +// Code generated by main. DO NOT EDIT. + +package v1alpha1 + +import ( + "net/http" + + v1alpha1 "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/apis/cloudbuild/v1alpha1" + "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/client/clientset/versioned/scheme" + rest "k8s.io/client-go/rest" +) + +type CloudbuildV1alpha1Interface interface { + RESTClient() rest.Interface + CloudBuildWorkerPoolsGetter +} + +// CloudbuildV1alpha1Client is used to interact with features provided by the cloudbuild.cnrm.cloud.google.com group. +type CloudbuildV1alpha1Client struct { + restClient rest.Interface +} + +func (c *CloudbuildV1alpha1Client) CloudBuildWorkerPools(namespace string) CloudBuildWorkerPoolInterface { + return newCloudBuildWorkerPools(c, namespace) +} + +// NewForConfig creates a new CloudbuildV1alpha1Client for the given config. +// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), +// where httpClient was generated with rest.HTTPClientFor(c). +func NewForConfig(c *rest.Config) (*CloudbuildV1alpha1Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + httpClient, err := rest.HTTPClientFor(&config) + if err != nil { + return nil, err + } + return NewForConfigAndClient(&config, httpClient) +} + +// NewForConfigAndClient creates a new CloudbuildV1alpha1Client for the given config and http client. +// Note the http client provided takes precedence over the configured transport values. +func NewForConfigAndClient(c *rest.Config, h *http.Client) (*CloudbuildV1alpha1Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + client, err := rest.RESTClientForConfigAndClient(&config, h) + if err != nil { + return nil, err + } + return &CloudbuildV1alpha1Client{client}, nil +} + +// NewForConfigOrDie creates a new CloudbuildV1alpha1Client for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *CloudbuildV1alpha1Client { + client, err := NewForConfig(c) + if err != nil { + panic(err) + } + return client +} + +// New creates a new CloudbuildV1alpha1Client for the given RESTClient. +func New(c rest.Interface) *CloudbuildV1alpha1Client { + return &CloudbuildV1alpha1Client{c} +} + +func setConfigDefaults(config *rest.Config) error { + gv := v1alpha1.SchemeGroupVersion + config.GroupVersion = &gv + config.APIPath = "/apis" + config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() + + if config.UserAgent == "" { + config.UserAgent = rest.DefaultKubernetesUserAgent() + } + + return nil +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *CloudbuildV1alpha1Client) RESTClient() rest.Interface { + if c == nil { + return nil + } + return c.restClient +} diff --git a/pkg/clients/generated/client/clientset/versioned/typed/cloudbuild/v1beta1/cloudbuildworkerpool.go b/pkg/clients/generated/client/clientset/versioned/typed/cloudbuild/v1alpha1/cloudbuildworkerpool.go similarity index 77% rename from pkg/clients/generated/client/clientset/versioned/typed/cloudbuild/v1beta1/cloudbuildworkerpool.go rename to pkg/clients/generated/client/clientset/versioned/typed/cloudbuild/v1alpha1/cloudbuildworkerpool.go index 9956bbcda87..8159f96991b 100644 --- a/pkg/clients/generated/client/clientset/versioned/typed/cloudbuild/v1beta1/cloudbuildworkerpool.go +++ b/pkg/clients/generated/client/clientset/versioned/typed/cloudbuild/v1alpha1/cloudbuildworkerpool.go @@ -19,13 +19,13 @@ // Code generated by main. DO NOT EDIT. -package v1beta1 +package v1alpha1 import ( "context" "time" - v1beta1 "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/apis/cloudbuild/v1beta1" + v1alpha1 "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/apis/cloudbuild/v1alpha1" scheme "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/client/clientset/versioned/scheme" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -41,15 +41,15 @@ type CloudBuildWorkerPoolsGetter interface { // CloudBuildWorkerPoolInterface has methods to work with CloudBuildWorkerPool resources. type CloudBuildWorkerPoolInterface interface { - Create(ctx context.Context, cloudBuildWorkerPool *v1beta1.CloudBuildWorkerPool, opts v1.CreateOptions) (*v1beta1.CloudBuildWorkerPool, error) - Update(ctx context.Context, cloudBuildWorkerPool *v1beta1.CloudBuildWorkerPool, opts v1.UpdateOptions) (*v1beta1.CloudBuildWorkerPool, error) - UpdateStatus(ctx context.Context, cloudBuildWorkerPool *v1beta1.CloudBuildWorkerPool, opts v1.UpdateOptions) (*v1beta1.CloudBuildWorkerPool, error) + Create(ctx context.Context, cloudBuildWorkerPool *v1alpha1.CloudBuildWorkerPool, opts v1.CreateOptions) (*v1alpha1.CloudBuildWorkerPool, error) + Update(ctx context.Context, cloudBuildWorkerPool *v1alpha1.CloudBuildWorkerPool, opts v1.UpdateOptions) (*v1alpha1.CloudBuildWorkerPool, error) + UpdateStatus(ctx context.Context, cloudBuildWorkerPool *v1alpha1.CloudBuildWorkerPool, opts v1.UpdateOptions) (*v1alpha1.CloudBuildWorkerPool, error) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.CloudBuildWorkerPool, error) - List(ctx context.Context, opts v1.ListOptions) (*v1beta1.CloudBuildWorkerPoolList, error) + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.CloudBuildWorkerPool, error) + List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.CloudBuildWorkerPoolList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.CloudBuildWorkerPool, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.CloudBuildWorkerPool, err error) CloudBuildWorkerPoolExpansion } @@ -60,7 +60,7 @@ type cloudBuildWorkerPools struct { } // newCloudBuildWorkerPools returns a CloudBuildWorkerPools -func newCloudBuildWorkerPools(c *CloudbuildV1beta1Client, namespace string) *cloudBuildWorkerPools { +func newCloudBuildWorkerPools(c *CloudbuildV1alpha1Client, namespace string) *cloudBuildWorkerPools { return &cloudBuildWorkerPools{ client: c.RESTClient(), ns: namespace, @@ -68,8 +68,8 @@ func newCloudBuildWorkerPools(c *CloudbuildV1beta1Client, namespace string) *clo } // Get takes name of the cloudBuildWorkerPool, and returns the corresponding cloudBuildWorkerPool object, and an error if there is any. -func (c *cloudBuildWorkerPools) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.CloudBuildWorkerPool, err error) { - result = &v1beta1.CloudBuildWorkerPool{} +func (c *cloudBuildWorkerPools) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.CloudBuildWorkerPool, err error) { + result = &v1alpha1.CloudBuildWorkerPool{} err = c.client.Get(). Namespace(c.ns). Resource("cloudbuildworkerpools"). @@ -81,12 +81,12 @@ func (c *cloudBuildWorkerPools) Get(ctx context.Context, name string, options v1 } // List takes label and field selectors, and returns the list of CloudBuildWorkerPools that match those selectors. -func (c *cloudBuildWorkerPools) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.CloudBuildWorkerPoolList, err error) { +func (c *cloudBuildWorkerPools) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.CloudBuildWorkerPoolList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second } - result = &v1beta1.CloudBuildWorkerPoolList{} + result = &v1alpha1.CloudBuildWorkerPoolList{} err = c.client.Get(). Namespace(c.ns). Resource("cloudbuildworkerpools"). @@ -113,8 +113,8 @@ func (c *cloudBuildWorkerPools) Watch(ctx context.Context, opts v1.ListOptions) } // Create takes the representation of a cloudBuildWorkerPool and creates it. Returns the server's representation of the cloudBuildWorkerPool, and an error, if there is any. -func (c *cloudBuildWorkerPools) Create(ctx context.Context, cloudBuildWorkerPool *v1beta1.CloudBuildWorkerPool, opts v1.CreateOptions) (result *v1beta1.CloudBuildWorkerPool, err error) { - result = &v1beta1.CloudBuildWorkerPool{} +func (c *cloudBuildWorkerPools) Create(ctx context.Context, cloudBuildWorkerPool *v1alpha1.CloudBuildWorkerPool, opts v1.CreateOptions) (result *v1alpha1.CloudBuildWorkerPool, err error) { + result = &v1alpha1.CloudBuildWorkerPool{} err = c.client.Post(). Namespace(c.ns). Resource("cloudbuildworkerpools"). @@ -126,8 +126,8 @@ func (c *cloudBuildWorkerPools) Create(ctx context.Context, cloudBuildWorkerPool } // Update takes the representation of a cloudBuildWorkerPool and updates it. Returns the server's representation of the cloudBuildWorkerPool, and an error, if there is any. -func (c *cloudBuildWorkerPools) Update(ctx context.Context, cloudBuildWorkerPool *v1beta1.CloudBuildWorkerPool, opts v1.UpdateOptions) (result *v1beta1.CloudBuildWorkerPool, err error) { - result = &v1beta1.CloudBuildWorkerPool{} +func (c *cloudBuildWorkerPools) Update(ctx context.Context, cloudBuildWorkerPool *v1alpha1.CloudBuildWorkerPool, opts v1.UpdateOptions) (result *v1alpha1.CloudBuildWorkerPool, err error) { + result = &v1alpha1.CloudBuildWorkerPool{} err = c.client.Put(). Namespace(c.ns). Resource("cloudbuildworkerpools"). @@ -141,8 +141,8 @@ func (c *cloudBuildWorkerPools) Update(ctx context.Context, cloudBuildWorkerPool // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *cloudBuildWorkerPools) UpdateStatus(ctx context.Context, cloudBuildWorkerPool *v1beta1.CloudBuildWorkerPool, opts v1.UpdateOptions) (result *v1beta1.CloudBuildWorkerPool, err error) { - result = &v1beta1.CloudBuildWorkerPool{} +func (c *cloudBuildWorkerPools) UpdateStatus(ctx context.Context, cloudBuildWorkerPool *v1alpha1.CloudBuildWorkerPool, opts v1.UpdateOptions) (result *v1alpha1.CloudBuildWorkerPool, err error) { + result = &v1alpha1.CloudBuildWorkerPool{} err = c.client.Put(). Namespace(c.ns). Resource("cloudbuildworkerpools"). @@ -183,8 +183,8 @@ func (c *cloudBuildWorkerPools) DeleteCollection(ctx context.Context, opts v1.De } // Patch applies the patch and returns the patched cloudBuildWorkerPool. -func (c *cloudBuildWorkerPools) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.CloudBuildWorkerPool, err error) { - result = &v1beta1.CloudBuildWorkerPool{} +func (c *cloudBuildWorkerPools) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.CloudBuildWorkerPool, err error) { + result = &v1alpha1.CloudBuildWorkerPool{} err = c.client.Patch(pt). Namespace(c.ns). Resource("cloudbuildworkerpools"). diff --git a/pkg/clients/generated/client/clientset/versioned/typed/cloudbuild/v1alpha1/doc.go b/pkg/clients/generated/client/clientset/versioned/typed/cloudbuild/v1alpha1/doc.go new file mode 100644 index 00000000000..61f2499ab1e --- /dev/null +++ b/pkg/clients/generated/client/clientset/versioned/typed/cloudbuild/v1alpha1/doc.go @@ -0,0 +1,23 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// *** DISCLAIMER *** +// Config Connector's go-client for CRDs is currently in ALPHA, which means +// that future versions of the go-client may include breaking changes. +// Please try it out and give us feedback! + +// Code generated by main. DO NOT EDIT. + +// This package has the automatically generated typed clients. +package v1alpha1 diff --git a/pkg/clients/generated/client/clientset/versioned/typed/cloudbuild/v1alpha1/fake/doc.go b/pkg/clients/generated/client/clientset/versioned/typed/cloudbuild/v1alpha1/fake/doc.go new file mode 100644 index 00000000000..7a394916061 --- /dev/null +++ b/pkg/clients/generated/client/clientset/versioned/typed/cloudbuild/v1alpha1/fake/doc.go @@ -0,0 +1,23 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// *** DISCLAIMER *** +// Config Connector's go-client for CRDs is currently in ALPHA, which means +// that future versions of the go-client may include breaking changes. +// Please try it out and give us feedback! + +// Code generated by main. DO NOT EDIT. + +// Package fake has the automatically generated clients. +package fake diff --git a/pkg/clients/generated/client/clientset/versioned/typed/cloudbuild/v1alpha1/fake/fake_cloudbuild_client.go b/pkg/clients/generated/client/clientset/versioned/typed/cloudbuild/v1alpha1/fake/fake_cloudbuild_client.go new file mode 100644 index 00000000000..b13233079d9 --- /dev/null +++ b/pkg/clients/generated/client/clientset/versioned/typed/cloudbuild/v1alpha1/fake/fake_cloudbuild_client.go @@ -0,0 +1,43 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// *** DISCLAIMER *** +// Config Connector's go-client for CRDs is currently in ALPHA, which means +// that future versions of the go-client may include breaking changes. +// Please try it out and give us feedback! + +// Code generated by main. DO NOT EDIT. + +package fake + +import ( + v1alpha1 "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/client/clientset/versioned/typed/cloudbuild/v1alpha1" + rest "k8s.io/client-go/rest" + testing "k8s.io/client-go/testing" +) + +type FakeCloudbuildV1alpha1 struct { + *testing.Fake +} + +func (c *FakeCloudbuildV1alpha1) CloudBuildWorkerPools(namespace string) v1alpha1.CloudBuildWorkerPoolInterface { + return &FakeCloudBuildWorkerPools{c, namespace} +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *FakeCloudbuildV1alpha1) RESTClient() rest.Interface { + var ret *rest.RESTClient + return ret +} diff --git a/pkg/clients/generated/client/clientset/versioned/typed/cloudbuild/v1beta1/fake/fake_cloudbuildworkerpool.go b/pkg/clients/generated/client/clientset/versioned/typed/cloudbuild/v1alpha1/fake/fake_cloudbuildworkerpool.go similarity index 69% rename from pkg/clients/generated/client/clientset/versioned/typed/cloudbuild/v1beta1/fake/fake_cloudbuildworkerpool.go rename to pkg/clients/generated/client/clientset/versioned/typed/cloudbuild/v1alpha1/fake/fake_cloudbuildworkerpool.go index 09319e3d991..1bf7db4b49e 100644 --- a/pkg/clients/generated/client/clientset/versioned/typed/cloudbuild/v1beta1/fake/fake_cloudbuildworkerpool.go +++ b/pkg/clients/generated/client/clientset/versioned/typed/cloudbuild/v1alpha1/fake/fake_cloudbuildworkerpool.go @@ -24,7 +24,7 @@ package fake import ( "context" - v1beta1 "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/apis/cloudbuild/v1beta1" + v1alpha1 "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/apis/cloudbuild/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" types "k8s.io/apimachinery/pkg/types" @@ -34,29 +34,29 @@ import ( // FakeCloudBuildWorkerPools implements CloudBuildWorkerPoolInterface type FakeCloudBuildWorkerPools struct { - Fake *FakeCloudbuildV1beta1 + Fake *FakeCloudbuildV1alpha1 ns string } -var cloudbuildworkerpoolsResource = v1beta1.SchemeGroupVersion.WithResource("cloudbuildworkerpools") +var cloudbuildworkerpoolsResource = v1alpha1.SchemeGroupVersion.WithResource("cloudbuildworkerpools") -var cloudbuildworkerpoolsKind = v1beta1.SchemeGroupVersion.WithKind("CloudBuildWorkerPool") +var cloudbuildworkerpoolsKind = v1alpha1.SchemeGroupVersion.WithKind("CloudBuildWorkerPool") // Get takes name of the cloudBuildWorkerPool, and returns the corresponding cloudBuildWorkerPool object, and an error if there is any. -func (c *FakeCloudBuildWorkerPools) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.CloudBuildWorkerPool, err error) { +func (c *FakeCloudBuildWorkerPools) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.CloudBuildWorkerPool, err error) { obj, err := c.Fake. - Invokes(testing.NewGetAction(cloudbuildworkerpoolsResource, c.ns, name), &v1beta1.CloudBuildWorkerPool{}) + Invokes(testing.NewGetAction(cloudbuildworkerpoolsResource, c.ns, name), &v1alpha1.CloudBuildWorkerPool{}) if obj == nil { return nil, err } - return obj.(*v1beta1.CloudBuildWorkerPool), err + return obj.(*v1alpha1.CloudBuildWorkerPool), err } // List takes label and field selectors, and returns the list of CloudBuildWorkerPools that match those selectors. -func (c *FakeCloudBuildWorkerPools) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.CloudBuildWorkerPoolList, err error) { +func (c *FakeCloudBuildWorkerPools) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.CloudBuildWorkerPoolList, err error) { obj, err := c.Fake. - Invokes(testing.NewListAction(cloudbuildworkerpoolsResource, cloudbuildworkerpoolsKind, c.ns, opts), &v1beta1.CloudBuildWorkerPoolList{}) + Invokes(testing.NewListAction(cloudbuildworkerpoolsResource, cloudbuildworkerpoolsKind, c.ns, opts), &v1alpha1.CloudBuildWorkerPoolList{}) if obj == nil { return nil, err @@ -66,8 +66,8 @@ func (c *FakeCloudBuildWorkerPools) List(ctx context.Context, opts v1.ListOption if label == nil { label = labels.Everything() } - list := &v1beta1.CloudBuildWorkerPoolList{ListMeta: obj.(*v1beta1.CloudBuildWorkerPoolList).ListMeta} - for _, item := range obj.(*v1beta1.CloudBuildWorkerPoolList).Items { + list := &v1alpha1.CloudBuildWorkerPoolList{ListMeta: obj.(*v1alpha1.CloudBuildWorkerPoolList).ListMeta} + for _, item := range obj.(*v1alpha1.CloudBuildWorkerPoolList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -83,43 +83,43 @@ func (c *FakeCloudBuildWorkerPools) Watch(ctx context.Context, opts v1.ListOptio } // Create takes the representation of a cloudBuildWorkerPool and creates it. Returns the server's representation of the cloudBuildWorkerPool, and an error, if there is any. -func (c *FakeCloudBuildWorkerPools) Create(ctx context.Context, cloudBuildWorkerPool *v1beta1.CloudBuildWorkerPool, opts v1.CreateOptions) (result *v1beta1.CloudBuildWorkerPool, err error) { +func (c *FakeCloudBuildWorkerPools) Create(ctx context.Context, cloudBuildWorkerPool *v1alpha1.CloudBuildWorkerPool, opts v1.CreateOptions) (result *v1alpha1.CloudBuildWorkerPool, err error) { obj, err := c.Fake. - Invokes(testing.NewCreateAction(cloudbuildworkerpoolsResource, c.ns, cloudBuildWorkerPool), &v1beta1.CloudBuildWorkerPool{}) + Invokes(testing.NewCreateAction(cloudbuildworkerpoolsResource, c.ns, cloudBuildWorkerPool), &v1alpha1.CloudBuildWorkerPool{}) if obj == nil { return nil, err } - return obj.(*v1beta1.CloudBuildWorkerPool), err + return obj.(*v1alpha1.CloudBuildWorkerPool), err } // Update takes the representation of a cloudBuildWorkerPool and updates it. Returns the server's representation of the cloudBuildWorkerPool, and an error, if there is any. -func (c *FakeCloudBuildWorkerPools) Update(ctx context.Context, cloudBuildWorkerPool *v1beta1.CloudBuildWorkerPool, opts v1.UpdateOptions) (result *v1beta1.CloudBuildWorkerPool, err error) { +func (c *FakeCloudBuildWorkerPools) Update(ctx context.Context, cloudBuildWorkerPool *v1alpha1.CloudBuildWorkerPool, opts v1.UpdateOptions) (result *v1alpha1.CloudBuildWorkerPool, err error) { obj, err := c.Fake. - Invokes(testing.NewUpdateAction(cloudbuildworkerpoolsResource, c.ns, cloudBuildWorkerPool), &v1beta1.CloudBuildWorkerPool{}) + Invokes(testing.NewUpdateAction(cloudbuildworkerpoolsResource, c.ns, cloudBuildWorkerPool), &v1alpha1.CloudBuildWorkerPool{}) if obj == nil { return nil, err } - return obj.(*v1beta1.CloudBuildWorkerPool), err + return obj.(*v1alpha1.CloudBuildWorkerPool), err } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeCloudBuildWorkerPools) UpdateStatus(ctx context.Context, cloudBuildWorkerPool *v1beta1.CloudBuildWorkerPool, opts v1.UpdateOptions) (*v1beta1.CloudBuildWorkerPool, error) { +func (c *FakeCloudBuildWorkerPools) UpdateStatus(ctx context.Context, cloudBuildWorkerPool *v1alpha1.CloudBuildWorkerPool, opts v1.UpdateOptions) (*v1alpha1.CloudBuildWorkerPool, error) { obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceAction(cloudbuildworkerpoolsResource, "status", c.ns, cloudBuildWorkerPool), &v1beta1.CloudBuildWorkerPool{}) + Invokes(testing.NewUpdateSubresourceAction(cloudbuildworkerpoolsResource, "status", c.ns, cloudBuildWorkerPool), &v1alpha1.CloudBuildWorkerPool{}) if obj == nil { return nil, err } - return obj.(*v1beta1.CloudBuildWorkerPool), err + return obj.(*v1alpha1.CloudBuildWorkerPool), err } // Delete takes name of the cloudBuildWorkerPool and deletes it. Returns an error if one occurs. func (c *FakeCloudBuildWorkerPools) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. - Invokes(testing.NewDeleteActionWithOptions(cloudbuildworkerpoolsResource, c.ns, name, opts), &v1beta1.CloudBuildWorkerPool{}) + Invokes(testing.NewDeleteActionWithOptions(cloudbuildworkerpoolsResource, c.ns, name, opts), &v1alpha1.CloudBuildWorkerPool{}) return err } @@ -128,17 +128,17 @@ func (c *FakeCloudBuildWorkerPools) Delete(ctx context.Context, name string, opt func (c *FakeCloudBuildWorkerPools) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { action := testing.NewDeleteCollectionAction(cloudbuildworkerpoolsResource, c.ns, listOpts) - _, err := c.Fake.Invokes(action, &v1beta1.CloudBuildWorkerPoolList{}) + _, err := c.Fake.Invokes(action, &v1alpha1.CloudBuildWorkerPoolList{}) return err } // Patch applies the patch and returns the patched cloudBuildWorkerPool. -func (c *FakeCloudBuildWorkerPools) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.CloudBuildWorkerPool, err error) { +func (c *FakeCloudBuildWorkerPools) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.CloudBuildWorkerPool, err error) { obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(cloudbuildworkerpoolsResource, c.ns, name, pt, data, subresources...), &v1beta1.CloudBuildWorkerPool{}) + Invokes(testing.NewPatchSubresourceAction(cloudbuildworkerpoolsResource, c.ns, name, pt, data, subresources...), &v1alpha1.CloudBuildWorkerPool{}) if obj == nil { return nil, err } - return obj.(*v1beta1.CloudBuildWorkerPool), err + return obj.(*v1alpha1.CloudBuildWorkerPool), err } diff --git a/pkg/clients/generated/client/clientset/versioned/typed/cloudbuild/v1alpha1/generated_expansion.go b/pkg/clients/generated/client/clientset/versioned/typed/cloudbuild/v1alpha1/generated_expansion.go new file mode 100644 index 00000000000..c5d66185323 --- /dev/null +++ b/pkg/clients/generated/client/clientset/versioned/typed/cloudbuild/v1alpha1/generated_expansion.go @@ -0,0 +1,24 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// *** DISCLAIMER *** +// Config Connector's go-client for CRDs is currently in ALPHA, which means +// that future versions of the go-client may include breaking changes. +// Please try it out and give us feedback! + +// Code generated by main. DO NOT EDIT. + +package v1alpha1 + +type CloudBuildWorkerPoolExpansion interface{} diff --git a/pkg/clients/generated/client/clientset/versioned/typed/cloudbuild/v1beta1/cloudbuild_client.go b/pkg/clients/generated/client/clientset/versioned/typed/cloudbuild/v1beta1/cloudbuild_client.go index af03120bd45..21966479bbb 100644 --- a/pkg/clients/generated/client/clientset/versioned/typed/cloudbuild/v1beta1/cloudbuild_client.go +++ b/pkg/clients/generated/client/clientset/versioned/typed/cloudbuild/v1beta1/cloudbuild_client.go @@ -32,7 +32,6 @@ import ( type CloudbuildV1beta1Interface interface { RESTClient() rest.Interface CloudBuildTriggersGetter - CloudBuildWorkerPoolsGetter } // CloudbuildV1beta1Client is used to interact with features provided by the cloudbuild.cnrm.cloud.google.com group. @@ -44,10 +43,6 @@ func (c *CloudbuildV1beta1Client) CloudBuildTriggers(namespace string) CloudBuil return newCloudBuildTriggers(c, namespace) } -func (c *CloudbuildV1beta1Client) CloudBuildWorkerPools(namespace string) CloudBuildWorkerPoolInterface { - return newCloudBuildWorkerPools(c, namespace) -} - // NewForConfig creates a new CloudbuildV1beta1Client for the given config. // NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), // where httpClient was generated with rest.HTTPClientFor(c). diff --git a/pkg/clients/generated/client/clientset/versioned/typed/cloudbuild/v1beta1/fake/fake_cloudbuild_client.go b/pkg/clients/generated/client/clientset/versioned/typed/cloudbuild/v1beta1/fake/fake_cloudbuild_client.go index c54c724b271..6e3183820a3 100644 --- a/pkg/clients/generated/client/clientset/versioned/typed/cloudbuild/v1beta1/fake/fake_cloudbuild_client.go +++ b/pkg/clients/generated/client/clientset/versioned/typed/cloudbuild/v1beta1/fake/fake_cloudbuild_client.go @@ -35,10 +35,6 @@ func (c *FakeCloudbuildV1beta1) CloudBuildTriggers(namespace string) v1beta1.Clo return &FakeCloudBuildTriggers{c, namespace} } -func (c *FakeCloudbuildV1beta1) CloudBuildWorkerPools(namespace string) v1beta1.CloudBuildWorkerPoolInterface { - return &FakeCloudBuildWorkerPools{c, namespace} -} - // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. func (c *FakeCloudbuildV1beta1) RESTClient() rest.Interface { diff --git a/pkg/clients/generated/client/clientset/versioned/typed/cloudbuild/v1beta1/generated_expansion.go b/pkg/clients/generated/client/clientset/versioned/typed/cloudbuild/v1beta1/generated_expansion.go index 85031d83140..a22920228c7 100644 --- a/pkg/clients/generated/client/clientset/versioned/typed/cloudbuild/v1beta1/generated_expansion.go +++ b/pkg/clients/generated/client/clientset/versioned/typed/cloudbuild/v1beta1/generated_expansion.go @@ -22,5 +22,3 @@ package v1beta1 type CloudBuildTriggerExpansion interface{} - -type CloudBuildWorkerPoolExpansion interface{} diff --git a/pkg/controller/direct/cloudbuild/workerpool_controller.go b/pkg/controller/direct/cloudbuild/workerpool_controller.go index 643a60b16cd..89c6cd47c10 100644 --- a/pkg/controller/direct/cloudbuild/workerpool_controller.go +++ b/pkg/controller/direct/cloudbuild/workerpool_controller.go @@ -28,8 +28,8 @@ import ( cloudbuildpb "cloud.google.com/go/cloudbuild/apiv1/v2/cloudbuildpb" "google.golang.org/api/option" - krm "github.com/GoogleCloudPlatform/k8s-config-connector/apis/cloudbuild/v1beta1" - "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/controller" + krm "github.com/GoogleCloudPlatform/k8s-config-connector/apis/cloudbuild/v1alpha1" + "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/config" "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/controller/direct/directbase" "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/controller/direct/references" "github.com/googleapis/gax-go/v2/apierror" @@ -45,8 +45,8 @@ func init() { directbase.ControllerBuilder.RegisterModel(krm.GroupVersionKind, NewModel) } -func NewModel(config *controller.Config) directbase.Model { - return &model{config: config} +func NewModel(config *config.ControllerConfig) directbase.Model { + return &model{config: *config} } const ctrlName = "cloudbuild-controller" @@ -54,7 +54,7 @@ const ctrlName = "cloudbuild-controller" var _ directbase.Model = &model{} type model struct { - config *controller.Config + config config.ControllerConfig } func (m *model) client(ctx context.Context) (*gcp.Client, error) { @@ -190,13 +190,12 @@ func (a *Adapter) Create(ctx context.Context, u *unstructured.Unstructured) erro if err != nil { return fmt.Errorf("cloudbuildworkerpool %s waiting creation failed: %w", wp.Name, err) } - status := &krm.CloudBuildWorkerPoolStatus{} if err := krm.Convert_WorkerPool_API_v1_To_KRM_status(created, status); err != nil { return fmt.Errorf("update workerpool status %w", err) } - status.CreateTime = ToDateDashTime(created.GetCreateTime()) - status.UpdateTime = ToDateDashTime(created.GetUpdateTime()) + status.ObservedState.CreateTime = ToOpenAPIDateTime(created.GetCreateTime()) + status.ObservedState.UpdateTime = ToOpenAPIDateTime(created.GetUpdateTime()) return setStatus(u, status) } @@ -281,8 +280,8 @@ func (a *Adapter) Update(ctx context.Context, u *unstructured.Unstructured) erro if err := krm.Convert_WorkerPool_API_v1_To_KRM_status(updated, status); err != nil { return fmt.Errorf("update workerpool status %w", err) } - status.CreateTime = ToDateDashTime(updated.GetCreateTime()) - status.UpdateTime = ToDateDashTime(updated.GetUpdateTime()) + status.ObservedState.CreateTime = ToOpenAPIDateTime(updated.GetCreateTime()) + status.ObservedState.UpdateTime = ToOpenAPIDateTime(updated.GetUpdateTime()) return setStatus(u, status) } @@ -378,7 +377,7 @@ func LazyPtr[T comparable](v T) *T { return &v } -func ToDateDashTime(ts *timestamppb.Timestamp) *string { +func ToOpenAPIDateTime(ts *timestamppb.Timestamp) *string { formatted := ts.AsTime().Format(time.RFC3339) return &formatted } diff --git a/pkg/controller/direct/references/computenetworkref.go b/pkg/controller/direct/references/computenetworkref.go index 13c7de95329..d93d9bb3611 100644 --- a/pkg/controller/direct/references/computenetworkref.go +++ b/pkg/controller/direct/references/computenetworkref.go @@ -88,8 +88,8 @@ func ResolveComputeNetwork(ctx context.Context, reader client.Reader, src client computenetworkID = computenetwork.GetName() } + //TODO: extract GetProject helper function! projectID := "" - // TODO: where is the const var. annotations := computenetwork.GetAnnotations() fromAnnotation, ok := annotations["cnrm.cloud.google.com/project-id"] if ok { diff --git a/pkg/test/resourcefixture/testdata/basic/cloudbuild/v1beta1/cloudbuildworkerpool/_generated_object_cloudbuildworkerpool.golden.yaml b/pkg/test/resourcefixture/testdata/basic/cloudbuild/v1alpha1/cloudbuildworkerpool/_generated_object_cloudbuildworkerpool.golden.yaml similarity index 89% rename from pkg/test/resourcefixture/testdata/basic/cloudbuild/v1beta1/cloudbuildworkerpool/_generated_object_cloudbuildworkerpool.golden.yaml rename to pkg/test/resourcefixture/testdata/basic/cloudbuild/v1alpha1/cloudbuildworkerpool/_generated_object_cloudbuildworkerpool.golden.yaml index 6b66ebd271e..6ef17e2bd2a 100644 --- a/pkg/test/resourcefixture/testdata/basic/cloudbuild/v1beta1/cloudbuildworkerpool/_generated_object_cloudbuildworkerpool.golden.yaml +++ b/pkg/test/resourcefixture/testdata/basic/cloudbuild/v1alpha1/cloudbuildworkerpool/_generated_object_cloudbuildworkerpool.golden.yaml @@ -1,4 +1,4 @@ -apiVersion: cloudbuild.cnrm.cloud.google.com/v1beta1 +apiVersion: cloudbuild.cnrm.cloud.google.com/v1alpha1 kind: CloudBuildWorkerPool metadata: finalizers: @@ -30,14 +30,14 @@ status: reason: UpToDate status: "True" type: Ready - createTime: "1970-01-01T00:00:00Z" observedGeneration: 2 observedState: + createTime: "1970-01-01T00:00:00Z" networkConfig: egressOption: NO_PUBLIC_EGRESS peeredNetwork: projects/${projectId}/global/networks/computenetwork-${uniqueId} peeredNetworkIpRange: /29 + updateTime: "2024-06-07T10:17:04Z" workerConfig: diskSizeGb: 100 machineType: e2-medium - updateTime: "1970-01-01T00:00:00Z" diff --git a/pkg/test/resourcefixture/testdata/basic/cloudbuild/v1beta1/cloudbuildworkerpool/_http.log b/pkg/test/resourcefixture/testdata/basic/cloudbuild/v1alpha1/cloudbuildworkerpool/_http.log similarity index 98% rename from pkg/test/resourcefixture/testdata/basic/cloudbuild/v1beta1/cloudbuildworkerpool/_http.log rename to pkg/test/resourcefixture/testdata/basic/cloudbuild/v1alpha1/cloudbuildworkerpool/_http.log index 85a9d1bcd02..b359164c03f 100644 --- a/pkg/test/resourcefixture/testdata/basic/cloudbuild/v1beta1/cloudbuildworkerpool/_http.log +++ b/pkg/test/resourcefixture/testdata/basic/cloudbuild/v1alpha1/cloudbuildworkerpool/_http.log @@ -500,7 +500,7 @@ X-Xss-Protection: 0 GET https://cloudbuild.googleapis.com/v1/projects/${projectId}/locations/us-central1/workerPools/cloudbuildworkerpool-${uniqueId}?%24alt=json%3Benum-encoding%3Dint Content-Type: application/json -x-goog-api-client: gl-go/1.23.0-20240419-RC02 gapic/1.16.1 gax/2.12.3 rest/UNKNOWN +x-goog-api-client: gl-go/1.22.4 gapic/1.16.1 gax/2.12.3 rest/UNKNOWN x-goog-request-params: location=us-central1 404 Not Found @@ -526,7 +526,7 @@ X-Xss-Protection: 0 POST https://cloudbuild.googleapis.com/v1/projects/${projectId}/locations/us-central1/workerPools?%24alt=json%3Benum-encoding%3Dint&workerPoolId=cloudbuildworkerpool-${uniqueId} Content-Type: application/json -x-goog-api-client: gl-go/1.23.0-20240419-RC02 gapic/1.16.1 gax/2.12.3 rest/UNKNOWN +x-goog-api-client: gl-go/1.22.4 gapic/1.16.1 gax/2.12.3 rest/UNKNOWN x-goog-request-params: location=us-central1 { @@ -570,7 +570,7 @@ X-Xss-Protection: 0 GET https://cloudbuild.googleapis.com/v1/projects/${projectId}/locations/us-central1/workerPools/cloudbuildworkerpool-${uniqueId}/operations/${operationID} Content-Type: application/json -x-goog-api-client: gl-go/1.23.0-20240419-RC02 gapic/UNKNOWN gax/2.12.3 rest/UNKNOWN +x-goog-api-client: gl-go/1.22.4 gapic/UNKNOWN gax/2.12.3 rest/UNKNOWN x-goog-request-params: name=projects%2F${projectId}%2Flocations%2Fus-central1%2FworkerPools%2Fcloudbuildworkerpool-${uniqueId}%2Foperations%2F${operationID} 200 OK @@ -618,7 +618,7 @@ X-Xss-Protection: 0 GET https://cloudbuild.googleapis.com/v1/projects/${projectId}/locations/us-central1/workerPools/cloudbuildworkerpool-${uniqueId}?%24alt=json%3Benum-encoding%3Dint Content-Type: application/json -x-goog-api-client: gl-go/1.23.0-20240419-RC02 gapic/1.16.1 gax/2.12.3 rest/UNKNOWN +x-goog-api-client: gl-go/1.22.4 gapic/1.16.1 gax/2.12.3 rest/UNKNOWN x-goog-request-params: location=us-central1 200 OK @@ -652,7 +652,7 @@ X-Xss-Protection: 0 PATCH https://cloudbuild.googleapis.com/v1/projects/${projectId}/locations/us-central1/workerPools/cloudbuildworkerpool-${uniqueId}?%24alt=json%3Benum-encoding%3Dint&updateMask=privatePoolV1Config.workerConfig.diskSizeGb Content-Type: application/json -x-goog-api-client: gl-go/1.23.0-20240419-RC02 gapic/1.16.1 gax/2.12.3 rest/UNKNOWN +x-goog-api-client: gl-go/1.22.4 gapic/1.16.1 gax/2.12.3 rest/UNKNOWN x-goog-request-params: location=us-central1 { @@ -743,7 +743,7 @@ X-Xss-Protection: 0 DELETE https://cloudbuild.googleapis.com/v1/projects/${projectId}/locations/us-central1/workerPools/cloudbuildworkerpool-${uniqueId}?%24alt=json%3Benum-encoding%3Dint&allowMissing=true Content-Type: application/json -x-goog-api-client: gl-go/1.23.0-20240419-RC02 gapic/1.16.1 gax/2.12.3 rest/UNKNOWN +x-goog-api-client: gl-go/1.22.4 gapic/1.16.1 gax/2.12.3 rest/UNKNOWN x-goog-request-params: location=us-central1 200 OK diff --git a/pkg/test/resourcefixture/testdata/basic/cloudbuild/v1beta1/cloudbuildworkerpool/create.yaml b/pkg/test/resourcefixture/testdata/basic/cloudbuild/v1alpha1/cloudbuildworkerpool/create.yaml similarity index 95% rename from pkg/test/resourcefixture/testdata/basic/cloudbuild/v1beta1/cloudbuildworkerpool/create.yaml rename to pkg/test/resourcefixture/testdata/basic/cloudbuild/v1alpha1/cloudbuildworkerpool/create.yaml index da9695a02e8..312d9f94b2a 100644 --- a/pkg/test/resourcefixture/testdata/basic/cloudbuild/v1beta1/cloudbuildworkerpool/create.yaml +++ b/pkg/test/resourcefixture/testdata/basic/cloudbuild/v1alpha1/cloudbuildworkerpool/create.yaml @@ -11,7 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -apiVersion: cloudbuild.cnrm.cloud.google.com/v1beta1 +apiVersion: cloudbuild.cnrm.cloud.google.com/v1alpha1 kind: CloudBuildWorkerPool metadata: name: cloudbuildworkerpool-${uniqueId} diff --git a/pkg/test/resourcefixture/testdata/basic/cloudbuild/v1beta1/cloudbuildworkerpool/dependencies.yaml b/pkg/test/resourcefixture/testdata/basic/cloudbuild/v1alpha1/cloudbuildworkerpool/dependencies.yaml similarity index 100% rename from pkg/test/resourcefixture/testdata/basic/cloudbuild/v1beta1/cloudbuildworkerpool/dependencies.yaml rename to pkg/test/resourcefixture/testdata/basic/cloudbuild/v1alpha1/cloudbuildworkerpool/dependencies.yaml diff --git a/pkg/test/resourcefixture/testdata/basic/cloudbuild/v1beta1/cloudbuildworkerpool/update.yaml b/pkg/test/resourcefixture/testdata/basic/cloudbuild/v1alpha1/cloudbuildworkerpool/update.yaml similarity index 95% rename from pkg/test/resourcefixture/testdata/basic/cloudbuild/v1beta1/cloudbuildworkerpool/update.yaml rename to pkg/test/resourcefixture/testdata/basic/cloudbuild/v1alpha1/cloudbuildworkerpool/update.yaml index 0016fdd4194..95df04dcb97 100644 --- a/pkg/test/resourcefixture/testdata/basic/cloudbuild/v1beta1/cloudbuildworkerpool/update.yaml +++ b/pkg/test/resourcefixture/testdata/basic/cloudbuild/v1alpha1/cloudbuildworkerpool/update.yaml @@ -11,7 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -apiVersion: cloudbuild.cnrm.cloud.google.com/v1beta1 +apiVersion: cloudbuild.cnrm.cloud.google.com/v1alpha1 kind: CloudBuildWorkerPool metadata: name: cloudbuildworkerpool-${uniqueId} diff --git a/scripts/github-actions/tests-e2e-direct.sh b/scripts/github-actions/tests-e2e-direct.sh index 5b179b049c4..8f3a8c00baf 100755 --- a/scripts/github-actions/tests-e2e-direct.sh +++ b/scripts/github-actions/tests-e2e-direct.sh @@ -43,4 +43,11 @@ E2E_KUBE_TARGET=envtest RUN_E2E=1 E2E_GCP_TARGET=mock \ echo "Running scenarios tests for LoggingLogMetric direct reconciliation..." GOLDEN_REQUEST_CHECKS=1 E2E_KUBE_TARGET=envtest E2E_GCP_TARGET=mock RUN_E2E=1 \ - go test -test.count=1 -timeout 360s -v ./tests/e2e -run TestE2EScript/scenarios/fields \ No newline at end of file + go test -test.count=1 -timeout 360s -v ./tests/e2e -run TestE2EScript/scenarios/fields + + +echo "Running e2e tests fixtures for CloudBuildWorkerPool direct reconciliation..." +GOLDEN_OBJECT_CHECKS=1 \ +GOLDEN_REQUEST_CHECKS=1 \ +E2E_KUBE_TARGET=envtest RUN_E2E=1 E2E_GCP_TARGET=mock \ + go test -test.count=1 -timeout 600s -v ./tests/e2e -run 'TestAllInSeries/fixtures/cloudbuildworkerpool' \ No newline at end of file