Skip to content

Commit

Permalink
Remove duplicate env var TZ from monitor spec (#5723)
Browse files Browse the repository at this point in the history
Co-authored-by: Ari Ekmekji <[email protected]>
  • Loading branch information
ti-chi-bot and ari-e authored Aug 27, 2024
1 parent bb7f07d commit 2764203
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions pkg/monitor/monitor/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -328,10 +328,6 @@ func getMonitorInitContainer(monitor *v1alpha1.TidbMonitor, tc *v1alpha1.TidbClu
Name: "GF_TIDB_PROMETHEUS_URL",
Value: "http://127.0.0.1:9090",
},
{
Name: "TZ",
Value: monitor.Timezone(),
},
{
Name: "TIDB_VERSION",
Value: getAlertManagerRulesVersion(monitor),
Expand Down Expand Up @@ -370,6 +366,13 @@ func getMonitorInitContainer(monitor *v1alpha1.TidbMonitor, tc *v1alpha1.TidbClu
Value: tc.Namespace,
},
}...)
} else {
container.Env = append(container.Env, []core.EnvVar{
{
Name: "TZ",
Value: monitor.Timezone(),
},
}...)
}

if monitor.Spec.Initializer.ImagePullPolicy != nil {
Expand Down

0 comments on commit 2764203

Please sign in to comment.