Add config module

The config module supports adding configuration to the exporter via a config file. This supports adding authentication details in a config file so that /probe requests can specify authentication for endpoints

Signed-off-by: Joe Adams <github@joeadams.io>
This commit is contained in:
Joe Adams
2022-03-04 16:39:48 -05:00
parent 713461df98
commit cc751b7966
9 changed files with 249 additions and 6 deletions

View File

@@ -0,0 +1,7 @@
auth_modules:
foo:
pretendauth:
username: test
password: pass
options:
extra: "1"

View File

@@ -0,0 +1,8 @@
auth_modules:
foo:
userpass:
username: test
password: pass
options:
extra: "1"
doesNotExist: test

8
config/testdata/config-good.yaml vendored Normal file
View File

@@ -0,0 +1,8 @@
auth_modules:
first:
type: userpass
userpass:
username: first
password: firstpass
options:
sslmode: disable