Skip to content

Commit

Permalink
make the drainer name configurable (#1604) (#1783)
Browse files Browse the repository at this point in the history
* make the drainer name configurable

This is used for the statefulset/pod names.

The release name is already unique, so I would actually suggest just using that
without the cluster name. However, that is a backwards incompatible
change that I hesitate to make.

* add a warning about updating the drainer name

Co-authored-by: Greg Weber <greg@gregweber.info>
  • Loading branch information
sre-bot and gregwebs authored Feb 26, 2020
1 parent 82b114a commit 203fa95
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
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
# 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

0 comments on commit 203fa95

Please sign in to comment.