Skip to content

Commit

Permalink
Remove duplicate env var TZ from monitor spec (#5721)
Browse files Browse the repository at this point in the history
  • Loading branch information
ari-e committed Aug 27, 2024
1 parent bdd4395 commit 5ba9080
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 5ba9080

Please sign in to comment.