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

Fix alert rules lost after rolling upgrade #2715

Merged
merged 3 commits into from
Jun 16, 2020
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
4 changes: 4 additions & 0 deletions charts/tidb-cluster/templates/monitor-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,11 @@ spec:
- name: PROM_PERSISTENT_DIR
value: /data
- name: TIDB_VERSION
{{- if .Values.monitor.prometheus.alertManagerRulesVersion }}
value: tidb:{{ .Values.monitor.prometheus.alertManagerRulesVersion }}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Required format of TIDB_VERSION is tidb:vx.x.x.

{{- else }}
value: {{ .Values.tidb.image }}
{{- end }}
- name: GF_K8S_PROMETHEUS_URL
value: {{ .Values.monitor.initializer.config.K8S_PROMETHEUS_URL }}
- name: GF_TIDB_PROMETHEUS_URL
Expand Down
5 changes: 5 additions & 0 deletions charts/tidb-cluster/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -573,6 +573,11 @@ monitor:
portName: http-prometheus
reserveDays: 12
# alertmanagerURL: ""

# alertManagerRulesVersion is the version of the tidb cluster that used for alert rules.
# default to current tidb cluster version, for example: v3.0.15
#
# alertManagerRulesVersion: ""
nodeSelector: {}
# kind: monitor
# zone: cn-bj1-01,cn-bj1-02
Expand Down