diff --git a/pkg/cluster/spec/alertmanager.go b/pkg/cluster/spec/alertmanager.go index 722d91952d..a220715494 100644 --- a/pkg/cluster/spec/alertmanager.go +++ b/pkg/cluster/spec/alertmanager.go @@ -91,6 +91,7 @@ func (c *AlertManagerComponent) Instances() []Instance { ins := make([]Instance, 0, len(alertmanagers)) for _, s := range alertmanagers { + s := s ins = append(ins, &AlertManagerInstance{ BaseInstance: BaseInstance{ InstanceSpec: s, diff --git a/pkg/cluster/spec/grafana.go b/pkg/cluster/spec/grafana.go index 6158dd0eb6..53a9dfe8e2 100644 --- a/pkg/cluster/spec/grafana.go +++ b/pkg/cluster/spec/grafana.go @@ -99,6 +99,7 @@ func (c *GrafanaComponent) Instances() []Instance { ins := make([]Instance, 0, len(servers)) for _, s := range servers { + s := s ins = append(ins, &GrafanaInstance{ BaseInstance: BaseInstance{ InstanceSpec: s, diff --git a/pkg/cluster/spec/monitoring.go b/pkg/cluster/spec/monitoring.go index da01b25c44..9f0de67fcc 100644 --- a/pkg/cluster/spec/monitoring.go +++ b/pkg/cluster/spec/monitoring.go @@ -112,6 +112,7 @@ func (c *MonitorComponent) Instances() []Instance { ins := make([]Instance, 0, len(servers)) for _, s := range servers { + s := s mi := &MonitorInstance{BaseInstance{ InstanceSpec: s, Name: c.Name(), diff --git a/pkg/cluster/spec/tispark.go b/pkg/cluster/spec/tispark.go index eb16fa550d..bc9199d77d 100644 --- a/pkg/cluster/spec/tispark.go +++ b/pkg/cluster/spec/tispark.go @@ -135,6 +135,7 @@ func (c *TiSparkMasterComponent) Role() string { func (c *TiSparkMasterComponent) Instances() []Instance { ins := make([]Instance, 0, len(c.Topology.TiSparkMasters)) for _, s := range c.Topology.TiSparkMasters { + s := s ins = append(ins, &TiSparkMasterInstance{ BaseInstance: BaseInstance{ InstanceSpec: s,