@@ -107,7 +107,7 @@ var affinityTemp string = `{{.Kind}}:
107
107
`
108
108
109
109
var binlogTemp string = `binlog:
110
- {{if .PumpConfig}} pump:
110
+ pump:
111
111
tolerations:
112
112
- key: node-role
113
113
operator: Equal
@@ -121,10 +121,11 @@ var binlogTemp string = `binlog:
121
121
topologyKey: {{.TopologyKey}}
122
122
namespaces:
123
123
- {{.Namespace}}
124
+ {{if .PumpConfig}}
124
125
config: |
125
126
{{range .PumpConfig}} {{.}}
126
127
{{end}}{{end}}
127
- {{if .DrainerConfig}} drainer:
128
+ drainer:
128
129
tolerations:
129
130
- key: node-role
130
131
operator: Equal
@@ -138,6 +139,7 @@ var binlogTemp string = `binlog:
138
139
topologyKey: {{.TopologyKey}}
139
140
namespaces:
140
141
- {{.Namespace}}
142
+ {{if .DrainerConfig}}
141
143
config: |
142
144
{{range .DrainerConfig}} {{.}}
143
145
{{end}}{{end}}
@@ -155,6 +157,8 @@ type AffinityInfo struct {
155
157
type BinLogInfo struct {
156
158
PumpConfig []string
157
159
DrainerConfig []string
160
+ Namespace string
161
+ TopologyKey string
158
162
}
159
163
160
164
func GetSubValuesOrDie (clusterName , namespace , topologyKey string , pdConfig []string , tikvConfig []string , tidbConfig []string , pumpConfig []string , drainerConfig []string ) string {
@@ -189,7 +193,7 @@ func GetSubValuesOrDie(clusterName, namespace, topologyKey string, pdConfig []st
189
193
slack .NotifyAndPanic (err )
190
194
}
191
195
binlogbuff := new (bytes.Buffer )
192
- err = btemp .Execute (binlogbuff , & BinLogInfo {PumpConfig : pumpConfig , DrainerConfig : drainerConfig })
196
+ err = btemp .Execute (binlogbuff , & BinLogInfo {PumpConfig : pumpConfig , DrainerConfig : drainerConfig , Namespace : namespace , TopologyKey : topologyKey })
193
197
if err != nil {
194
198
slack .NotifyAndPanic (err )
195
199
}
0 commit comments