Skip to content

Commit 72c5091

Browse files
committed
CLI: Deprecate short name wl from workload crd
1 parent e355ea8 commit 72c5091

File tree

11 files changed

+9
-11
lines changed

11 files changed

+9
-11
lines changed

apis/kueue/v1beta1/workload_types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -783,7 +783,7 @@ const (
783783
// +kubebuilder:printcolumn:name="Admitted",JSONPath=".status.conditions[?(@.type=='Admitted')].status",type="string",description="Admission status"
784784
// +kubebuilder:printcolumn:name="Finished",JSONPath=".status.conditions[?(@.type=='Finished')].status",type="string",description="Workload finished"
785785
// +kubebuilder:printcolumn:name="Age",JSONPath=".metadata.creationTimestamp",type="date",description="Time this workload was created"
786-
// +kubebuilder:resource:shortName={wl,kwl,kueueworkload}
786+
// +kubebuilder:resource:shortName={kwl,kueueworkload}
787787

788788
// Workload is the Schema for the workloads API
789789
// +kubebuilder:validation:XValidation:rule="has(self.status) && has(self.status.conditions) && self.status.conditions.exists(c, c.type == 'QuotaReserved' && c.status == 'True') && has(self.status.admission) ? size(self.spec.podSets) == size(self.status.admission.podSetAssignments) : true", message="podSetAssignments must have the same number of podSets as the spec"

apis/kueue/v1beta2/workload_types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1003,7 +1003,7 @@ const (
10031003
// +kubebuilder:printcolumn:name="Admitted",JSONPath=".status.conditions[?(@.type=='Admitted')].status",type="string",description="Admission status"
10041004
// +kubebuilder:printcolumn:name="Finished",JSONPath=".status.conditions[?(@.type=='Finished')].status",type="string",description="Workload finished"
10051005
// +kubebuilder:printcolumn:name="Age",JSONPath=".metadata.creationTimestamp",type="date",description="Time this workload was created"
1006-
// +kubebuilder:resource:shortName={wl,kwl,kueueworkload}
1006+
// +kubebuilder:resource:shortName={kwl,kueueworkload}
10071007

10081008
// Workload is the Schema for the workloads API
10091009
// +kubebuilder:validation:XValidation:rule="has(self.status) && has(self.status.conditions) && self.status.conditions.exists(c, c.type == 'QuotaReserved' && c.status == 'True') && has(self.status.admission) ? size(self.spec.podSets) == size(self.status.admission.podSetAssignments) : true", message="podSetAssignments must have the same number of podSets as the spec"

charts/kueue/templates/crd/kueue.x-k8s.io_workloads.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ spec:
4444
listKind: WorkloadList
4545
plural: workloads
4646
shortNames:
47-
- wl
4847
- kwl
4948
- kueueworkload
5049
singular: workload

cmd/kueuectl/app/delete/delete_workload.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ func NewWorkloadCmd(clientGetter clientgetter.ClientGetter, streams genericioopt
8989
cmd := &cobra.Command{
9090
Use: "workload NAME [--yes] [--all] [--dry-run STRATEGY]",
9191
DisableFlagsInUseLine: true,
92-
Aliases: []string{"wl", "kwl", "kueueworkload"},
92+
Aliases: []string{"kwl", "kueueworkload"},
9393
Short: "Delete the given Workload and its corresponding Job",
9494
Long: wlLong,
9595
Example: wlExample,

cmd/kueuectl/app/list/list_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ ns2 wl2 j2 lq2 cq2 PENDING
131131
`,
132132
},
133133
"should print workload list with all namespaces (short command and flag)": {
134-
args: []string{"wl", "-A"},
134+
args: []string{"kwl", "-A"},
135135
objs: []runtime.Object{
136136
utiltestingapi.MakeWorkload("wl1", "ns1").
137137
OwnerReference(batchv1.SchemeGroupVersion.WithKind("Job"), "j1", "test-uid").

cmd/kueuectl/app/list/list_workload.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ func NewWorkloadCmd(clientGetter clientgetter.ClientGetter, streams genericioopt
100100
Use: "workload [--clusterqueue CLUSTER_QUEUE_NAME] [--localqueue LOCAL_QUEUE_NAME] [--status STATUS] [--selector key1=value1] [--field-selector key1=value1] [--all-namespaces] [--for TYPE[.API-GROUP]/NAME]",
101101
// To do not add "[flags]" suffix on the end of usage line
102102
DisableFlagsInUseLine: true,
103-
Aliases: []string{"wl", "kwl", "kueueworkload"},
103+
Aliases: []string{"kwl", "kueueworkload"},
104104
Short: "List Workload",
105105
Long: wlLong,
106106
Example: wlExample,

cmd/kueuectl/app/passthrough/passthrough.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ var (
4949
}
5050

5151
passThroughTypes = []passThroughType{
52-
{name: "workload", aliases: []string{"wl", "kwl", "kueueworkload"}},
52+
{name: "workload", aliases: []string{"kwl", "kueueworkload"}},
5353
{name: "clusterqueue", aliases: []string{"cq"}},
5454
{name: "localqueue", aliases: []string{"lq"}},
5555
{name: "resourceflavor", aliases: []string{"rf"}},

cmd/kueuectl/app/resume/resume_workload.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ func NewWorkloadCmd(clientGetter clientgetter.ClientGetter, streams genericioopt
4242
Use: "workload NAME [--namespace NAMESPACE] [--dry-run STRATEGY]",
4343
// To do not add "[flags]" suffix on the end of usage line
4444
DisableFlagsInUseLine: true,
45-
Aliases: []string{"wl", "kwl", "kueueworkload"},
45+
Aliases: []string{"kwl", "kueueworkload"},
4646
Short: "Resume the Workload",
4747
Long: wlLong,
4848
Example: wlExample,

cmd/kueuectl/app/stop/stop_workload.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ func NewWorkloadCmd(clientGetter clientgetter.ClientGetter, streams genericioopt
4646
Use: "workload NAME [--namespace NAMESPACE] [--dry-run STRATEGY]",
4747
// To do not add "[flags]" suffix on the end of usage line
4848
DisableFlagsInUseLine: true,
49-
Aliases: []string{"wl", "kueueworkload", "kwl"},
49+
Aliases: []string{"kueueworkload", "kwl"},
5050
Short: "Stop the Workload",
5151
Long: wlLong,
5252
Example: wlExample,

config/components/crd/bases/kueue.x-k8s.io_workloads.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ spec:
1212
listKind: WorkloadList
1313
plural: workloads
1414
shortNames:
15-
- wl
1615
- kwl
1716
- kueueworkload
1817
singular: workload

0 commit comments

Comments
 (0)