mirror of
https://github.com/niusmallnan/steve.git
synced 2025-08-15 20:13:05 +00:00
K-EXPLORER: support --insecure-skip-tls-verify like kubectl
This commit is contained in:
parent
62d6de019d
commit
e56abbdc81
@ -14,11 +14,12 @@ import (
|
||||
)
|
||||
|
||||
type Config struct {
|
||||
KubeConfig string
|
||||
Context string
|
||||
HTTPSListenPort int
|
||||
HTTPListenPort int
|
||||
UIPath string
|
||||
KubeConfig string
|
||||
Context string
|
||||
HTTPSListenPort int
|
||||
HTTPListenPort int
|
||||
UIPath string
|
||||
InsecureSkipTLSVerify bool
|
||||
|
||||
WebhookConfig authcli.WebhookConfig
|
||||
}
|
||||
@ -42,6 +43,13 @@ func (c *Config) ToServer(ctx context.Context) (*server.Server, error) {
|
||||
}
|
||||
restConfig.RateLimiter = ratelimit.None
|
||||
|
||||
// K-EXPLORER
|
||||
restConfig.Insecure = c.InsecureSkipTLSVerify
|
||||
if restConfig.Insecure {
|
||||
restConfig.CAData = nil
|
||||
restConfig.CAFile = ""
|
||||
}
|
||||
|
||||
if c.WebhookConfig.WebhookAuthentication {
|
||||
auth, err = c.WebhookConfig.WebhookMiddleware()
|
||||
if err != nil {
|
||||
@ -84,6 +92,10 @@ func Flags(config *Config) []cli.Flag {
|
||||
Value: 9080,
|
||||
Destination: &config.HTTPListenPort,
|
||||
},
|
||||
cli.BoolFlag{
|
||||
Name: "insecure-skip-tls-verify",
|
||||
Destination: &config.InsecureSkipTLSVerify,
|
||||
},
|
||||
}
|
||||
|
||||
return append(flags, authcli.Flags(&config.WebhookConfig)...)
|
||||
|
Loading…
Reference in New Issue
Block a user