yml-config: Add support of rootUser and rootPassword (#18615)

Users can define the root user and password in the yaml configuration
file; Root credentials defined in the environment variable still take
precedence
This commit is contained in:
Anis Eleuch
2023-12-08 12:04:54 -08:00
committed by GitHub
parent aed7a1818a
commit 6f97663174
8 changed files with 136 additions and 8 deletions

View File

@@ -32,6 +32,8 @@ type Opts struct {
// ServerConfig represents a MinIO configuration file
type ServerConfig struct {
Version string `yaml:"version"`
RootUser string `yaml:"rootUser"`
RootPwd string `yaml:"rootPassword"`
Addr string `yaml:"address"`
ConsoleAddr string `yaml:"console-address"`
CertsDir string `yaml:"certs-dir"`