standardize config help defaults (#14788)

This commit is contained in:
Sidhartha Mani
2022-04-27 08:41:37 +05:30
committed by GitHub
parent c56a139fdc
commit fe1fbe0005
16 changed files with 291 additions and 189 deletions

View File

@@ -21,16 +21,20 @@ import "github.com/minio/minio/internal/config"
// Help template for OPA policy feature.
var (
defaultHelpPostfix = func(key string) string {
return config.DefaultHelpPostfix(DefaultKVS, key)
}
Help = config.HelpKVS{
config.HelpKV{
Key: URL,
Description: `[DEPRECATED] OPA HTTP(s) endpoint e.g. "http://localhost:8181/v1/data/httpapi/authz/allow"`,
Description: `[DEPRECATED] OPA HTTP(s) endpoint e.g. "http://localhost:8181/v1/data/httpapi/authz/allow"` + defaultHelpPostfix(URL),
Type: "url",
Sensitive: true,
},
config.HelpKV{
Key: AuthToken,
Description: "[DEPRECATED] authorization token for OPA endpoint",
Description: "[DEPRECATED] authorization token for OPA endpoint" + defaultHelpPostfix(AuthToken),
Optional: true,
Type: "string",
Sensitive: true,