Skip to content

Commit 9983828

Browse files
committed
feat(tarianctl): support setting tls params through env vars
1 parent 31d600c commit 9983828

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

pkg/tarianctl/cmd/flags.go

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,19 +25,22 @@ func CmdFlags() []cli.Flag {
2525
EnvVars: []string{"TARIAN_SERVER_ADDRESS"},
2626
},
2727
&cli.BoolFlag{
28-
Name: "server-tls-enabled",
29-
Usage: "If enabled, it will communicate with the server using TLS",
30-
Value: false,
28+
Name: "server-tls-enabled",
29+
Usage: "If enabled, it will communicate with the server using TLS",
30+
Value: false,
31+
EnvVars: []string{"TARIAN_TLS_ENABLED"},
3132
},
3233
&cli.StringFlag{
33-
Name: "server-tls-ca-file",
34-
Usage: "The CA the server uses for TLS connection.",
35-
Value: "",
34+
Name: "server-tls-ca-file",
35+
Usage: "The CA the server uses for TLS connection.",
36+
Value: "",
37+
EnvVars: []string{"TARIAN_TLS_CA_FILE"},
3638
},
3739
&cli.BoolFlag{
38-
Name: "server-tls-insecure-skip-verify",
39-
Usage: "If set to true, it will skip server's certificate chain and hostname verification",
40-
Value: true,
40+
Name: "server-tls-insecure-skip-verify",
41+
Usage: "If set to true, it will skip server's certificate chain and hostname verification",
42+
Value: true,
43+
EnvVars: []string{"TARIAN_TLS_INSECURE_SKIP_VERIFY"},
4144
},
4245
}
4346
}

0 commit comments

Comments
 (0)