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

make the drainer name configurable #1604

Merged
merged 9 commits into from
Feb 26, 2020
Merged
3 changes: 3 additions & 0 deletions charts/tidb-drainer/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{{- define "drainer.name" -}}
{{- if .Values.drainerName }}
{{ .Values.drainerName }}
{{- else -}}
{{ .Values.clusterName }}-{{ .Release.Name }}-drainer
{{- end -}}

Expand Down
5 changes: 5 additions & 0 deletions charts/tidb-drainer/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
# timezone is the default system timzone
timezone: UTC

# Change the name of the statefulset and pod
# The default is clusterName-ReleaseName-drainer
Comment on lines +8 to +9
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we warn user that changing name on existing will cause data loss?

Copy link
Contributor

Choose a reason for hiding this comment

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

cc @gregwebs add a notice then we merge this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

okay, warning added

# Do not change the name of an existing running drainer: this is unsupported.
# drainerName:

# clusterName is the TiDB cluster name that should backup from or restore to.
clusterName: demo
clusterVersion: v3.0.8
Expand Down