diff --git a/pkg/apis/build/v1beta1/build_types.go b/pkg/apis/build/v1beta1/build_types.go index 73822614b..dff003e6c 100644 --- a/pkg/apis/build/v1beta1/build_types.go +++ b/pkg/apis/build/v1beta1/build_types.go @@ -317,8 +317,7 @@ type BuildStatus struct { // +genclient // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// Build is the Schema representing a Build definition +// +kubebuilder:object:root=true // +kubebuilder:subresource:status // +kubebuilder:storageversion // +kubebuilder:resource:path=builds,scope=Namespaced @@ -327,6 +326,8 @@ type BuildStatus struct { // +kubebuilder:printcolumn:name="BuildStrategyKind",type="string",JSONPath=".spec.strategy.kind",description="The BuildStrategy type which is used for this Build" // +kubebuilder:printcolumn:name="BuildStrategyName",type="string",JSONPath=".spec.strategy.name",description="The BuildStrategy name which is used for this Build" // +kubebuilder:printcolumn:name="CreationTime",type="date",JSONPath=".metadata.creationTimestamp",description="The create time of this Build" + +// Build is the Schema representing a Build definition type Build struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` @@ -336,6 +337,7 @@ type Build struct { } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // BuildList contains a list of Build type BuildList struct { diff --git a/pkg/apis/build/v1beta1/buildrun_types.go b/pkg/apis/build/v1beta1/buildrun_types.go index af2882fbb..cc3b8461d 100644 --- a/pkg/apis/build/v1beta1/buildrun_types.go +++ b/pkg/apis/build/v1beta1/buildrun_types.go @@ -268,8 +268,7 @@ type FailureDetails struct { // +genclient // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// BuildRun is the Schema representing an instance of build execution +// +kubebuilder:object:root=true // +kubebuilder:subresource:status // +kubebuilder:storageversion // +kubebuilder:resource:path=buildruns,scope=Namespaced,shortName=br;brs @@ -277,6 +276,8 @@ type FailureDetails struct { // +kubebuilder:printcolumn:name="Reason",type="string",JSONPath=".status.conditions[?(@.type==\"Succeeded\")].reason",description="The Succeeded reason of the BuildRun" // +kubebuilder:printcolumn:name="StartTime",type="date",JSONPath=".status.startTime",description="The start time of this BuildRun" // +kubebuilder:printcolumn:name="CompletionTime",type="date",JSONPath=".status.completionTime",description="The completion time of this BuildRun" + +// BuildRun is the Schema representing an instance of build execution type BuildRun struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` @@ -286,6 +287,7 @@ type BuildRun struct { } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // BuildRunList contains a list of BuildRun type BuildRunList struct { diff --git a/pkg/apis/build/v1beta1/buildstrategy_types.go b/pkg/apis/build/v1beta1/buildstrategy_types.go index 1613164c7..8db6cabe8 100644 --- a/pkg/apis/build/v1beta1/buildstrategy_types.go +++ b/pkg/apis/build/v1beta1/buildstrategy_types.go @@ -23,11 +23,12 @@ const ( // +genclient // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// BuildStrategy is the Schema representing a strategy in the namespace scope to build images from source code. +// +kubebuilder:object:root=true // +kubebuilder:subresource:status // +kubebuilder:storageversion // +kubebuilder:resource:path=buildstrategies,scope=Namespaced,shortName=bs;bss + +// BuildStrategy is the Schema representing a strategy in the namespace scope to build images from source code. type BuildStrategy struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` @@ -37,6 +38,7 @@ type BuildStrategy struct { } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // BuildStrategyList contains a list of BuildStrategy type BuildStrategyList struct { diff --git a/pkg/apis/build/v1beta1/clusterbuildstrategy_types.go b/pkg/apis/build/v1beta1/clusterbuildstrategy_types.go index c6c612c39..1f1a5917a 100644 --- a/pkg/apis/build/v1beta1/clusterbuildstrategy_types.go +++ b/pkg/apis/build/v1beta1/clusterbuildstrategy_types.go @@ -24,11 +24,12 @@ const ( // +genclient // +genclient:nonNamespaced // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// ClusterBuildStrategy is the Schema representing a strategy in the cluster scope to build images from source code. +// +kubebuilder:object:root=true // +kubebuilder:subresource:status // +kubebuilder:storageversion // +kubebuilder:resource:path=clusterbuildstrategies,scope=Cluster,shortName=cbs;cbss + +// ClusterBuildStrategy is the Schema representing a strategy in the cluster scope to build images from source code. type ClusterBuildStrategy struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` @@ -38,6 +39,7 @@ type ClusterBuildStrategy struct { } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // ClusterBuildStrategyList contains a list of ClusterBuildStrategy type ClusterBuildStrategyList struct { diff --git a/pkg/apis/build/v1beta1/register.go b/pkg/apis/build/v1beta1/register.go index b23dbfe46..f7d89bdeb 100644 --- a/pkg/apis/build/v1beta1/register.go +++ b/pkg/apis/build/v1beta1/register.go @@ -4,9 +4,6 @@ // NOTE: Boilerplate only. Ignore this file. -// Package v1beta1 contains API Schema definitions for the build v1beta1 API group -// +k8s:deepcopy-gen=package,register -// +groupName=shipwright.io package v1beta1 import ( diff --git a/pkg/apis/build/v1beta1/trigger.go b/pkg/apis/build/v1beta1/trigger.go index 633417b3b..9f8367d44 100644 --- a/pkg/apis/build/v1beta1/trigger.go +++ b/pkg/apis/build/v1beta1/trigger.go @@ -1,6 +1,7 @@ // Copyright The Shipwright Contributors // // SPDX-License-Identifier: Apache-2.0 + package v1beta1 // Trigger represents the webhook trigger configuration for a Build. diff --git a/pkg/apis/build/v1beta1/trigger_types.go b/pkg/apis/build/v1beta1/trigger_types.go index ea6550f76..065720c98 100644 --- a/pkg/apis/build/v1beta1/trigger_types.go +++ b/pkg/apis/build/v1beta1/trigger_types.go @@ -1,6 +1,7 @@ // Copyright The Shipwright Contributors // // SPDX-License-Identifier: Apache-2.0 + package v1beta1 // TriggerType set of TriggerWhen valid names. diff --git a/pkg/apis/build/v1beta1/trigger_when.go b/pkg/apis/build/v1beta1/trigger_when.go index 1617c0b14..3fef49f25 100644 --- a/pkg/apis/build/v1beta1/trigger_when.go +++ b/pkg/apis/build/v1beta1/trigger_when.go @@ -1,6 +1,7 @@ // Copyright The Shipwright Contributors // // SPDX-License-Identifier: Apache-2.0 + package v1beta1 // TriggerWhen a given scenario where the webhook trigger is applicable.