Skip to content

Commit

Permalink
move cloudbuildworkerpool to alpha; other crd changes
Browse files Browse the repository at this point in the history
  • Loading branch information
yuwenma committed Jun 7, 2024
1 parent 5a9dd20 commit e4d2f72
Show file tree
Hide file tree
Showing 34 changed files with 799 additions and 430 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package v1beta1
package v1alpha1

import (
"fmt"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand All @@ -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"`
Expand Down

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

2 changes: 1 addition & 1 deletion apis/refs/v1beta1/networkref.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
}
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand All @@ -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:
Expand All @@ -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:
Expand All @@ -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
Expand Down

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

41 changes: 41 additions & 0 deletions pkg/clients/generated/apis/cloudbuild/v1alpha1/doc.go

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

63 changes: 63 additions & 0 deletions pkg/clients/generated/apis/cloudbuild/v1alpha1/register.go

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

Loading

0 comments on commit e4d2f72

Please sign in to comment.