Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bind newest stable non-core components #1129

Merged
merged 4 commits into from
Feb 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions components/dm/spec/bindversion.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@ package spec
import "github.com/pingcap/tiup/pkg/cluster/spec"

// DMComponentVersion maps the dm version to the third components binding version
// Empty version means the latest stable one
func DMComponentVersion(comp, version string) string {
switch comp {
case spec.ComponentAlertmanager:
return "v0.17.0"
case spec.ComponentGrafana, spec.ComponentPrometheus:
return "v4.0.3"
case spec.ComponentAlertmanager,
spec.ComponentGrafana,
spec.ComponentPrometheus:
return ""
default:
return version
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/cluster/embed/autogen_pkger.go

Large diffs are not rendered by default.

21 changes: 9 additions & 12 deletions pkg/cluster/spec/bindversion.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,17 @@ import (
)

// TiDBComponentVersion maps the TiDB version to the third components binding version
// Empty version should be treate as the the last stable one
func TiDBComponentVersion(comp, version string) string {
switch comp {
case ComponentAlertmanager:
return "v0.17.0"
case ComponentBlackboxExporter:
return "v0.12.0"
case ComponentNodeExporter:
return "v0.17.0"
case ComponentPushwaygate:
return "v0.7.0"
case ComponentCheckCollector:
return "" // empty version should be treate as the the last stable one
case ComponentSpark, ComponentTiSpark:
return "" // empty version should be treate as the the last stable one
case ComponentAlertmanager,
ComponentBlackboxExporter,
ComponentNodeExporter,
ComponentPushwaygate,
ComponentCheckCollector,
ComponentSpark,
ComponentTiSpark:
return ""
default:
return version
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/cluster/spec/prometheus.go
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ func (i *MonitorInstance) installRules(ctx context.Context, e ctxt.Executor, dep
cmds := []string{
"mkdir -p %[1]s",
`find %[1]s -type f -name "*.rules.yml" -delete`,
`find %[2]s/dm-master/conf -type f -name "*.rules.yml" -exec cp %[1]s \;`,
`find %[2]s/dm-master/conf -type f -name "*.rules.yml" -exec cp {} %[1]s \;`,
"rm -rf %[2]s",
}
_, stderr, err = e.Execute(ctx, fmt.Sprintf(strings.Join(cmds, " && "), targetDir, tmp), false)
Expand Down
3 changes: 0 additions & 3 deletions templates/config/prometheus.yml.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,6 @@ rule_files:
{{- if .DMWorkerAddrs}}
- 'dm_worker.rules.yml'
{{- end}}
{{- if .DMMasterAddrs}}
- 'dm_master.rules.yml'
{{- end}}
{{- end}}

{{- if .AlertmanagerAddrs}}
Expand Down