mirror of https://github.com/minio/minio.git
fix: handle race in server setup global CI/CD variable (#14579)
This commit is contained in:
parent
7bd9f821dd
commit
01ee49045e
|
@ -100,12 +100,16 @@ func init() {
|
||||||
PersistOnFailure: false,
|
PersistOnFailure: false,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
globalIsCICD = env.Get("MINIO_CI_CD", "") != "" || env.Get("CI", "") != ""
|
||||||
|
|
||||||
|
containers := IsKubernetes() || IsDocker() || IsBOSH() || IsDCOS() || IsPCFTile()
|
||||||
|
|
||||||
// Call to refresh will refresh names in cache. If you pass true, it will also
|
// Call to refresh will refresh names in cache. If you pass true, it will also
|
||||||
// remove cached names not looked up since the last call to Refresh. It is a good idea
|
// remove cached names not looked up since the last call to Refresh. It is a good idea
|
||||||
// to call this method on a regular interval.
|
// to call this method on a regular interval.
|
||||||
go func() {
|
go func() {
|
||||||
var t *time.Ticker
|
var t *time.Ticker
|
||||||
if IsKubernetes() || IsDocker() || IsBOSH() || IsDCOS() || IsPCFTile() {
|
if containers {
|
||||||
t = time.NewTicker(1 * time.Minute)
|
t = time.NewTicker(1 * time.Minute)
|
||||||
} else {
|
} else {
|
||||||
t = time.NewTicker(10 * time.Minute)
|
t = time.NewTicker(10 * time.Minute)
|
||||||
|
@ -664,8 +668,6 @@ func handleCommonEnvVars() {
|
||||||
globalRootDiskThreshold = size
|
globalRootDiskThreshold = size
|
||||||
}
|
}
|
||||||
|
|
||||||
globalIsCICD = env.Get("MINIO_CI_CD", "") != "" || env.Get("CI", "") != ""
|
|
||||||
|
|
||||||
domains := env.Get(config.EnvDomain, "")
|
domains := env.Get(config.EnvDomain, "")
|
||||||
if len(domains) != 0 {
|
if len(domains) != 0 {
|
||||||
for _, domainName := range strings.Split(domains, config.ValueSeparator) {
|
for _, domainName := range strings.Split(domains, config.ValueSeparator) {
|
||||||
|
|
Loading…
Reference in New Issue