diff --git a/apis/visibility/v1alpha1/openapi/zz_generated.openapi.go b/apis/visibility/v1alpha1/openapi/zz_generated.openapi.go index 6d04d889cd54..bfbd45a7c9c6 100644 --- a/apis/visibility/v1alpha1/openapi/zz_generated.openapi.go +++ b/apis/visibility/v1alpha1/openapi/zz_generated.openapi.go @@ -2702,20 +2702,6 @@ func schema_kueue_apis_visibility_v1alpha1_PendingWorkload(ref common.ReferenceC Description: "PendingWorkload is a user-facing representation of a pending workload that summarizes the relevant information for position in the cluster queue.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, "metadata": { SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, diff --git a/apis/visibility/v1alpha1/types.go b/apis/visibility/v1alpha1/types.go index c0a1dd846709..1d7b6e9980ef 100644 --- a/apis/visibility/v1alpha1/types.go +++ b/apis/visibility/v1alpha1/types.go @@ -20,27 +20,6 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) -// +kubebuilder:object:root=true - -// PendingWorkload is a user-facing representation of a pending workload that summarizes the relevant information for -// position in the cluster queue. -type PendingWorkload struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - // Priority indicates the workload's priority - Priority int32 `json:"priority"` - - // LocalQueueName indicates the name of the LocalQueue the workload is submitted to - LocalQueueName string `json:"localQueueName"` - - // PositionInClusterQueue indicates the workload's position in the ClusterQueue, starting from 0 - PositionInClusterQueue int32 `json:"positionInClusterQueue"` - - // PositionInLocalQueue indicates the workload's position in the LocalQueue, starting from 0 - PositionInLocalQueue int32 `json:"positionInLocalQueue"` -} - // +genclient // +kubebuilder:object:root=true // +k8s:openapi-gen=true @@ -80,6 +59,24 @@ type LocalQueueList struct { Items []LocalQueue `json:"items"` } +// PendingWorkload is a user-facing representation of a pending workload that summarizes the relevant information for +// position in the cluster queue. +type PendingWorkload struct { + metav1.ObjectMeta `json:"metadata,omitempty"` + + // Priority indicates the workload's priority + Priority int32 `json:"priority"` + + // LocalQueueName indicates the name of the LocalQueue the workload is submitted to + LocalQueueName string `json:"localQueueName"` + + // PositionInClusterQueue indicates the workload's position in the ClusterQueue, starting from 0 + PositionInClusterQueue int32 `json:"positionInClusterQueue"` + + // PositionInLocalQueue indicates the workload's position in the LocalQueue, starting from 0 + PositionInLocalQueue int32 `json:"positionInLocalQueue"` +} + // +k8s:openapi-gen=true // +kubebuilder:object:root=true diff --git a/apis/visibility/v1alpha1/zz_generated.deepcopy.go b/apis/visibility/v1alpha1/zz_generated.deepcopy.go index 14382e442412..95acfe1da35c 100644 --- a/apis/visibility/v1alpha1/zz_generated.deepcopy.go +++ b/apis/visibility/v1alpha1/zz_generated.deepcopy.go @@ -144,7 +144,6 @@ func (in *LocalQueueList) DeepCopyObject() runtime.Object { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *PendingWorkload) DeepCopyInto(out *PendingWorkload) { *out = *in - out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) } @@ -158,14 +157,6 @@ func (in *PendingWorkload) DeepCopy() *PendingWorkload { return out } -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *PendingWorkload) 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 *PendingWorkloadOptions) DeepCopyInto(out *PendingWorkloadOptions) { *out = *in diff --git a/client-go/applyconfiguration/visibility/v1alpha1/pendingworkload.go b/client-go/applyconfiguration/visibility/v1alpha1/pendingworkload.go index 5edff3ea5288..16741cbee18f 100644 --- a/client-go/applyconfiguration/visibility/v1alpha1/pendingworkload.go +++ b/client-go/applyconfiguration/visibility/v1alpha1/pendingworkload.go @@ -26,7 +26,6 @@ import ( // PendingWorkloadApplyConfiguration represents an declarative configuration of the PendingWorkload type for use // with apply. type PendingWorkloadApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` Priority *int32 `json:"priority,omitempty"` LocalQueueName *string `json:"localQueueName,omitempty"` @@ -37,26 +36,7 @@ type PendingWorkloadApplyConfiguration struct { // PendingWorkloadApplyConfiguration constructs an declarative configuration of the PendingWorkload type for use with // apply. func PendingWorkload() *PendingWorkloadApplyConfiguration { - b := &PendingWorkloadApplyConfiguration{} - b.WithKind("PendingWorkload") - b.WithAPIVersion("visibility.kueue.x-k8s.io/v1alpha1") - return b -} - -// WithKind sets the Kind field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Kind field is set to the value of the last call. -func (b *PendingWorkloadApplyConfiguration) WithKind(value string) *PendingWorkloadApplyConfiguration { - b.Kind = &value - return b -} - -// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the APIVersion field is set to the value of the last call. -func (b *PendingWorkloadApplyConfiguration) WithAPIVersion(value string) *PendingWorkloadApplyConfiguration { - b.APIVersion = &value - return b + return &PendingWorkloadApplyConfiguration{} } // WithName sets the Name field in the declarative configuration to the given value