whitelist certain ENVs from bootstrap check

This commit is contained in:
Harshavardhana 2021-09-01 11:37:58 -07:00
parent c89aee37b9
commit 67b6c945e2

View File

@ -91,10 +91,21 @@ func (s1 ServerSystemConfig) Diff(s2 ServerSystemConfig) error {
return nil return nil
} }
var skipEnvs = map[string]struct{}{
"MINIO_OPTS": {},
}
func getServerSystemCfg() ServerSystemConfig { func getServerSystemCfg() ServerSystemConfig {
envs := env.List("MINIO_") envs := env.List("MINIO_")
envValues := make(map[string]string, len(envs)) envValues := make(map[string]string, len(envs))
for _, envK := range envs { for _, envK := range envs {
// skip certain environment variables as part
// of the whitelist and could be configured
// differently on each nodes, update skipEnvs()
// map if there are such environment values
if _, ok := skipEnvs[envK]; ok {
continue
}
envValues[envK] = env.Get(envK, "") envValues[envK] = env.Get(envK, "")
} }
return ServerSystemConfig{ return ServerSystemConfig{