File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -185,6 +185,7 @@ func createClientOpts(config *config.ServerConfig) *clientbase.ClientOpts {
185185 AccessKey : config .AccessKey ,
186186 SecretKey : config .SecretKey ,
187187 CACerts : config .CACerts ,
188+ Insecure : config .Insecure ,
188189 }
189190 return options
190191}
Original file line number Diff line number Diff line change @@ -61,6 +61,10 @@ func LoginCommand() cli.Command {
6161 Name : "skip-verify" ,
6262 Usage : "Skip verification of the CACerts presented by the Server" ,
6363 },
64+ cli.BoolFlag {
65+ Name : "insecure" ,
66+ Usage : "Allow insecure server connections" ,
67+ },
6468 },
6569 }
6670}
@@ -80,7 +84,9 @@ func loginSetup(ctx *cli.Context) error {
8084 serverName = "rancherDefault"
8185 }
8286
83- serverConfig := & config.ServerConfig {}
87+ serverConfig := & config.ServerConfig {
88+ Insecure : ctx .Bool ("insecure" ),
89+ }
8490
8591 // Validate the url and drop the path
8692 u , err := url .ParseRequestURI (ctx .Args ().First ())
Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ type ServerConfig struct {
3030 CACerts string `json:"cacert"`
3131 KubeCredentials map [string ]* ExecCredential `json:"kubeCredentials"`
3232 KubeConfigs map [string ]* api.Config `json:"kubeConfigs"`
33+ Insecure bool `json:"insecure"`
3334}
3435
3536func (c Config ) Write () error {
You can’t perform that action at this time.
0 commit comments