@@ -44,9 +44,10 @@ func (p *Plural) cdCommands() []cli.Command {
4444 },
4545 },
4646 {
47- Name : "control-plane" ,
48- Action : p .handleInstallControlPlane ,
49- Usage : "sets up the plural console in an existing k8s cluster" ,
47+ Name : "control-plane" ,
48+ Aliases : []string {"helm-values" },
49+ Action : p .handleInstallControlPlane ,
50+ Usage : "sets up the plural console in an existing k8s cluster" ,
5051 },
5152 {
5253 Name : "control-plane-values" ,
@@ -69,7 +70,7 @@ func (p *Plural) cdCommands() []cli.Command {
6970 Action : p .handleCdLogin ,
7071 Usage : "logs into your plural console" ,
7172 Flags : []cli.Flag {
72- cli.StringFlag {Name : "url" , Usage : "console url" , Required : true },
73+ cli.StringFlag {Name : "url" , Usage : "console url" },
7374 cli.StringFlag {Name : "token" , Usage : "console access token" },
7475 },
7576 },
@@ -159,13 +160,22 @@ func confirmCluster(url, token string) (bool, error) {
159160
160161func (p * Plural ) handleCdLogin (c * cli.Context ) (err error ) {
161162 url := c .String ("url" )
163+ if url == "" {
164+ url , err = utils .ReadLine ("Enter the url of your console: " )
165+ if err != nil {
166+ return
167+ }
168+ }
169+
162170 token := c .String ("token" )
163171 if token == "" {
164- token , err = utils .ReadPwd ("Enter your console access token" )
172+ token , err = utils .ReadPwd ("Enter your console access token: " )
165173 if err != nil {
166174 return
167175 }
168176 }
177+
178+ url = console .NormalizeUrl (url )
169179 conf := console.Config {Url : url , Token : token }
170180 return conf .Save ()
171181}
0 commit comments