Skip to content

Commit

Permalink
Remove TypeMeta field from PendingWorkload (kubernetes#1386)
Browse files Browse the repository at this point in the history
  • Loading branch information
PBundyra authored Nov 30, 2023
1 parent 8431cbd commit 5825d15
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 65 deletions.
14 changes: 0 additions & 14 deletions apis/visibility/v1alpha1/openapi/zz_generated.openapi.go

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

39 changes: 18 additions & 21 deletions apis/visibility/v1alpha1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down
9 changes: 0 additions & 9 deletions apis/visibility/v1alpha1/zz_generated.deepcopy.go

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

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

0 comments on commit 5825d15

Please sign in to comment.