Skip to content

Commit

Permalink
Automated cherry pick of #1991: * Rename "Admitted by" to "Reserving …
Browse files Browse the repository at this point in the history
…in" printed column * (#2014)

* * Rename "Admitted by" to "Reserving in" printed column * Add "Admitted" printed column

* * Output Admitted column without -wide

* * Remove priority=0 as it's default

* * Documentation update
* Rename "Reserving in" to "Reserved in"
  • Loading branch information
vladikkuzn committed Apr 19, 2024
1 parent 4fecace commit e8927e4
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 11 deletions.
7 changes: 4 additions & 3 deletions apis/kueue/v1beta1/workload_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -315,9 +315,10 @@ const (
// +kubebuilder:object:root=true
// +kubebuilder:storageversion
// +kubebuilder:subresource:status
// +kubebuilder:printcolumn:name="Queue",JSONPath=".spec.queueName",type=string,description="Name of the queue this workload was submitted to"
// +kubebuilder:printcolumn:name="Admitted by",JSONPath=".status.admission.clusterQueue",type=string,description="Name of the ClusterQueue that admitted this workload"
// +kubebuilder:printcolumn:name="Age",JSONPath=".metadata.creationTimestamp",type=date,description="Time this workload was created"
// +kubebuilder:printcolumn:name="Queue",JSONPath=".spec.queueName",type="string",description="Name of the queue this workload was submitted to"
// +kubebuilder:printcolumn:name="Reserved in",JSONPath=".status.admission.clusterQueue",type="string",description="Name of the ClusterQueue where the workload is reserving quota"
// +kubebuilder:printcolumn:name="Admitted",JSONPath=".status.conditions[?(@.type=='Admitted')].status",type="string",description="Admission status"
// +kubebuilder:printcolumn:name="Age",JSONPath=".metadata.creationTimestamp",type="date",description="Time this workload was created"
// +kubebuilder:resource:shortName={wl}

// Workload is the Schema for the workloads API
Expand Down
8 changes: 6 additions & 2 deletions charts/kueue/templates/crd/kueue.x-k8s.io_workloads.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,13 @@ spec:
jsonPath: .spec.queueName
name: Queue
type: string
- description: Name of the ClusterQueue that admitted this workload
- description: Name of the ClusterQueue where the workload is reserving quota
jsonPath: .status.admission.clusterQueue
name: Admitted by
name: Reserved in
type: string
- description: Admission status
jsonPath: .status.conditions[?(@.type=='Admitted')].status
name: Admitted
type: string
- description: Time this workload was created
jsonPath: .metadata.creationTimestamp
Expand Down
8 changes: 6 additions & 2 deletions config/components/crd/bases/kueue.x-k8s.io_workloads.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,13 @@ spec:
jsonPath: .spec.queueName
name: Queue
type: string
- description: Name of the ClusterQueue that admitted this workload
- description: Name of the ClusterQueue where the workload is reserving quota
jsonPath: .status.admission.clusterQueue
name: Admitted by
name: Reserved in
type: string
- description: Admission status
jsonPath: .status.conditions[?(@.type=='Admitted')].status
name: Admitted
type: string
- description: Time this workload was created
jsonPath: .metadata.creationTimestamp
Expand Down
8 changes: 4 additions & 4 deletions site/content/en/docs/tasks/run_jobs.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ kubectl -n default get workloads
The output will be similar to the following:

```shell
NAME QUEUE ADMITTED BY AGE
sample-job-sl4bm user-queue 1s
NAME QUEUE RESERVED IN ADMITTED AGE
sample-job-sl4bm user-queue 1s
```

## 3. (Optional) Monitor the status of the workload
Expand Down Expand Up @@ -123,8 +123,8 @@ kubectl -n default get workloads
The output is similar to the following:
```shell
NAME QUEUE ADMITTED BY AGE
sample-job-sl4bm user-queue cluster-queue 45s
NAME QUEUE RESERVED IN ADMITTED AGE
sample-job-sl4bm user-queue cluster-queue True 1s
```
To view the event for the Workload admission, run the following command:
Expand Down

0 comments on commit e8927e4

Please sign in to comment.