feat: Skip TLS verify in loading config from url

Signed-off-by: DiniFarb <andreas.vogt89@bluewin.ch>
This commit is contained in:
DiniFarb
2023-07-11 07:36:36 +02:00
committed by Ben Reedy
parent 6797126e78
commit 11ec45e710
2 changed files with 15 additions and 3 deletions

View File

@@ -105,6 +105,10 @@ func main() {
"config.file",
"YAML configuration file to use. Values set in this file will be overridden by CLI flags.",
).String()
insecure_skip_verify = app.Flag(
"config.file.insecure-skip-verify",
"Skip TLS verification in loading YAML configuration.",
).Default("false").Bool()
webConfig = webflag.AddFlags(app, ":9182")
metricsPath = app.Flag(
"telemetry.path",
@@ -152,7 +156,7 @@ func main() {
_ = level.Debug(logger).Log("msg", "Logging has Started")
if *configFile != "" {
resolver, err := config.NewResolver(*configFile, logger)
resolver, err := config.NewResolver(*configFile, logger, *insecure_skip_verify)
if err != nil {
_ = level.Error(logger).Log("msg", "could not load config file", "err", err)
os.Exit(1)