Skip to content

Commit a128ae3

Browse files
authored
Add describe job (#2438)
1 parent 9e73d57 commit a128ae3

File tree

9 files changed

+1794
-2
lines changed

9 files changed

+1794
-2
lines changed

cmd/experimental/kjobctl/docs/commands/kjobctl.md

+1
Original file line numberDiff line numberDiff line change
@@ -200,5 +200,6 @@ ML/AI/Batch Jobs Made Easy
200200
## See Also
201201

202202
* [kjobctl create](kjobctl_create/_index.md) - Create a task
203+
* [kjobctl describe](kjobctl_describe/_index.md) - Show details of a specific resource or group of resources.
203204
* [kjobctl list](kjobctl_list/_index.md) - Display resources
204205

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,263 @@
1+
<!--
2+
The file is auto-generated from the Go source code of the component using the
3+
[generator](https://github.com/kubernetes-sigs/kueue/tree/main/cmd/experimental/kjobctl/hack/tools/kjobctl-docs).
4+
-->
5+
6+
# kjobctl describe
7+
8+
9+
## Synopsis
10+
11+
12+
Show details of a specific resource or group of resources.
13+
14+
```
15+
kjobctl describe MODE NAME
16+
```
17+
18+
19+
## Examples
20+
21+
```
22+
# Describe a task with job mode
23+
kjobctl describe job sample-job
24+
25+
# Describe a task with job mode
26+
kjobctl describe job/sample-job
27+
28+
# Describe all tasks with job mode
29+
kjobctl describe job
30+
31+
# Describe tasks by label name=myLabel
32+
kjobctl describe job -l name=myLabel
33+
```
34+
35+
36+
## Options
37+
38+
39+
<table style="width: 100%; table-layout: fixed;">
40+
<colgroup>
41+
<col span="1" style="width: 10px;" />
42+
<col span="1" />
43+
</colgroup>
44+
<tbody>
45+
<tr>
46+
<td colspan="2">-A, --all-namespaces</td>
47+
</tr>
48+
<tr>
49+
<td></td>
50+
<td style="line-height: 130%; word-wrap: break-word;">
51+
<p>If present, list the requested object(s) across all namespaces. Namespace in current context is ignored even if specified with --namespace.</p>
52+
</td>
53+
</tr>
54+
<tr>
55+
<td colspan="2">-h, --help</td>
56+
</tr>
57+
<tr>
58+
<td></td>
59+
<td style="line-height: 130%; word-wrap: break-word;">
60+
<p>help for describe</p>
61+
</td>
62+
</tr>
63+
<tr>
64+
<td colspan="2">-p, --profile string</td>
65+
</tr>
66+
<tr>
67+
<td></td>
68+
<td style="line-height: 130%; word-wrap: break-word;">
69+
<p>Filter by profile name which is associated with the resource.</p>
70+
</td>
71+
</tr>
72+
<tr>
73+
<td colspan="2">-l, --selector string</td>
74+
</tr>
75+
<tr>
76+
<td></td>
77+
<td style="line-height: 130%; word-wrap: break-word;">
78+
<p>Selector (label query) to filter on, supports &#39;=&#39;, &#39;==&#39;, and &#39;!=&#39;.(e.g. -l key1=value1,key2=value2). Matching objects must satisfy all of the specified label constraints.</p>
79+
</td>
80+
</tr>
81+
</tbody>
82+
</table>
83+
84+
85+
86+
## Options inherited from parent commands
87+
<table style="width: 100%; table-layout: fixed;">
88+
<colgroup>
89+
<col span="1" style="width: 10px;" />
90+
<col span="1" />
91+
</colgroup>
92+
<tbody>
93+
<tr>
94+
<td colspan="2">--as string</td>
95+
</tr>
96+
<tr>
97+
<td></td>
98+
<td style="line-height: 130%; word-wrap: break-word;">
99+
<p>Username to impersonate for the operation. User could be a regular user or a service account in a namespace.</p>
100+
</td>
101+
</tr>
102+
<tr>
103+
<td colspan="2">--as-group strings</td>
104+
</tr>
105+
<tr>
106+
<td></td>
107+
<td style="line-height: 130%; word-wrap: break-word;">
108+
<p>Group to impersonate for the operation, this flag can be repeated to specify multiple groups.</p>
109+
</td>
110+
</tr>
111+
<tr>
112+
<td colspan="2">--as-uid string</td>
113+
</tr>
114+
<tr>
115+
<td></td>
116+
<td style="line-height: 130%; word-wrap: break-word;">
117+
<p>UID to impersonate for the operation.</p>
118+
</td>
119+
</tr>
120+
<tr>
121+
<td colspan="2">--cache-dir string&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Default: &#34;$HOME/.kube/cache&#34;</td>
122+
</tr>
123+
<tr>
124+
<td></td>
125+
<td style="line-height: 130%; word-wrap: break-word;">
126+
<p>Default cache directory</p>
127+
</td>
128+
</tr>
129+
<tr>
130+
<td colspan="2">--certificate-authority string</td>
131+
</tr>
132+
<tr>
133+
<td></td>
134+
<td style="line-height: 130%; word-wrap: break-word;">
135+
<p>Path to a cert file for the certificate authority</p>
136+
</td>
137+
</tr>
138+
<tr>
139+
<td colspan="2">--client-certificate string</td>
140+
</tr>
141+
<tr>
142+
<td></td>
143+
<td style="line-height: 130%; word-wrap: break-word;">
144+
<p>Path to a client certificate file for TLS</p>
145+
</td>
146+
</tr>
147+
<tr>
148+
<td colspan="2">--client-key string</td>
149+
</tr>
150+
<tr>
151+
<td></td>
152+
<td style="line-height: 130%; word-wrap: break-word;">
153+
<p>Path to a client key file for TLS</p>
154+
</td>
155+
</tr>
156+
<tr>
157+
<td colspan="2">--cluster string</td>
158+
</tr>
159+
<tr>
160+
<td></td>
161+
<td style="line-height: 130%; word-wrap: break-word;">
162+
<p>The name of the kubeconfig cluster to use</p>
163+
</td>
164+
</tr>
165+
<tr>
166+
<td colspan="2">--context string</td>
167+
</tr>
168+
<tr>
169+
<td></td>
170+
<td style="line-height: 130%; word-wrap: break-word;">
171+
<p>The name of the kubeconfig context to use</p>
172+
</td>
173+
</tr>
174+
<tr>
175+
<td colspan="2">--disable-compression</td>
176+
</tr>
177+
<tr>
178+
<td></td>
179+
<td style="line-height: 130%; word-wrap: break-word;">
180+
<p>If true, opt-out of response compression for all requests to the server</p>
181+
</td>
182+
</tr>
183+
<tr>
184+
<td colspan="2">--insecure-skip-tls-verify</td>
185+
</tr>
186+
<tr>
187+
<td></td>
188+
<td style="line-height: 130%; word-wrap: break-word;">
189+
<p>If true, the server&#39;s certificate will not be checked for validity. This will make your HTTPS connections insecure</p>
190+
</td>
191+
</tr>
192+
<tr>
193+
<td colspan="2">--kubeconfig string</td>
194+
</tr>
195+
<tr>
196+
<td></td>
197+
<td style="line-height: 130%; word-wrap: break-word;">
198+
<p>Path to the kubeconfig file to use for CLI requests.</p>
199+
</td>
200+
</tr>
201+
<tr>
202+
<td colspan="2">-n, --namespace string</td>
203+
</tr>
204+
<tr>
205+
<td></td>
206+
<td style="line-height: 130%; word-wrap: break-word;">
207+
<p>If present, the namespace scope for this CLI request</p>
208+
</td>
209+
</tr>
210+
<tr>
211+
<td colspan="2">--request-timeout string&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Default: &#34;0&#34;</td>
212+
</tr>
213+
<tr>
214+
<td></td>
215+
<td style="line-height: 130%; word-wrap: break-word;">
216+
<p>The length of time to wait before giving up on a single server request. Non-zero values should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don&#39;t timeout requests.</p>
217+
</td>
218+
</tr>
219+
<tr>
220+
<td colspan="2">-s, --server string</td>
221+
</tr>
222+
<tr>
223+
<td></td>
224+
<td style="line-height: 130%; word-wrap: break-word;">
225+
<p>The address and port of the Kubernetes API server</p>
226+
</td>
227+
</tr>
228+
<tr>
229+
<td colspan="2">--tls-server-name string</td>
230+
</tr>
231+
<tr>
232+
<td></td>
233+
<td style="line-height: 130%; word-wrap: break-word;">
234+
<p>Server name to use for server certificate validation. If it is not provided, the hostname used to contact the server is used</p>
235+
</td>
236+
</tr>
237+
<tr>
238+
<td colspan="2">--token string</td>
239+
</tr>
240+
<tr>
241+
<td></td>
242+
<td style="line-height: 130%; word-wrap: break-word;">
243+
<p>Bearer token for authentication to the API server</p>
244+
</td>
245+
</tr>
246+
<tr>
247+
<td colspan="2">--user string</td>
248+
</tr>
249+
<tr>
250+
<td></td>
251+
<td style="line-height: 130%; word-wrap: break-word;">
252+
<p>The name of the kubeconfig user to use</p>
253+
</td>
254+
</tr>
255+
</tbody>
256+
</table>
257+
258+
259+
260+
## See Also
261+
262+
* [kjobctl](../kjobctl.md) - ML/AI/Batch Jobs Made Easy
263+

cmd/experimental/kjobctl/pkg/cmd/cmd.go

+2
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ import (
2626

2727
"sigs.k8s.io/kueue/cmd/experimental/kjobctl/pkg/cmd/completion"
2828
"sigs.k8s.io/kueue/cmd/experimental/kjobctl/pkg/cmd/create"
29+
"sigs.k8s.io/kueue/cmd/experimental/kjobctl/pkg/cmd/describe"
2930
"sigs.k8s.io/kueue/cmd/experimental/kjobctl/pkg/cmd/list"
3031
"sigs.k8s.io/kueue/cmd/experimental/kjobctl/pkg/cmd/util"
3132
)
@@ -75,6 +76,7 @@ func NewKjobctlCmd(o KjobctlOptions) *cobra.Command {
7576
cobra.CheckErr(cmd.RegisterFlagCompletionFunc("user", completion.UsersFunc(clientGetter)))
7677

7778
cmd.AddCommand(create.NewCreateCmd(clientGetter, o.IOStreams, o.Clock))
79+
cmd.AddCommand(describe.NewDescribeCmd(clientGetter, o.IOStreams))
7880
cmd.AddCommand(list.NewListCmd(clientGetter, o.IOStreams, o.Clock))
7981

8082
return cmd

0 commit comments

Comments
 (0)