-
Notifications
You must be signed in to change notification settings - Fork 127
/
root.go
50 lines (41 loc) · 1.2 KB
/
root.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
package cmd
import (
"github.com/spf13/cobra"
"github.com/armadaproject/armada/internal/armadactl"
"github.com/armadaproject/armada/pkg/client"
)
// RootCmd is the root Cobra command that gets called from the main func.
// All other sub-commands should be registered here.
func RootCmd() *cobra.Command {
cmd := &cobra.Command{
Use: "armadactl",
Short: "armadactl controls the Armada batch job queueing system.",
Long: `armadactl controls the Armada batch job queueing system.
Persistent config can be saved in a config file so it doesn't have to be specified every command.
Example structure:
armadaUrl: localhost:50051
basicAuth:
username: user1
password: password123
The location of this file can be passed in using --config argument or picked from $HOME/.armadactl.yaml.`,
}
client.AddArmadaApiConnectionCommandlineArgs(cmd)
cmd.AddCommand(
analyzeCmd(),
cancelCmd(),
createCmd(armadactl.New()),
deleteCmd(),
updateCmd(),
describeCmd(),
kubeCmd(),
reprioritizeCmd(),
resourcesCmd(),
submitCmd(),
versionCmd(),
watchCmd(),
getSchedulingReportCmd(armadactl.New()),
getQueueSchedulingReportCmd(armadactl.New()),
getJobSchedulingReportCmd(armadactl.New()),
)
return cmd
}