-
Notifications
You must be signed in to change notification settings - Fork 498
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
Add new helm chart tidb-drainer to support multiple drainer #744
Conversation
Signed-off-by: Aylei <rayingecho@gmail.com>
-config=/etc/drainer/drainer.toml \ | ||
-disable-detect={{ .Values.disableDetect | default false }} \ | ||
-initial-commit-ts={{ .Values.initialCommitTs | default 0 }} \ | ||
-log-file= |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This empty argument looks odd.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, pass an empty string explicitly would be better
elapseTime=0 | ||
period=1 | ||
threshold=30 | ||
while true; do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This part could be an init container. Also it looks like this technically would need the wait-for-pd init container from #581 if someone wanted to install this helm chart immediately after the tidb-cluster chart.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed, tracked in #749 to keep this PR simple (actually this PR just extracts the drainer statefulset from the tidb-cluster chart)
Signed-off-by: Aylei <rayingecho@gmail.com>
You should create two issues to track things:
|
app.kubernetes.io/component: drainer | ||
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} | ||
data: | ||
{{ include "drainer-configmap.data" . | indent 2 }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add new line
selector: | ||
app.kubernetes.io/name: {{ include "drainer.name" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
app.kubernetes.io/component: drainer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
new line
matchLabels: | ||
app.kubernetes.io/name: {{ include "drainer.name" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
app.kubernetes.io/managed-by: tidb-operator |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
managed-by: tidb-operator?
labels: | ||
app.kubernetes.io/name: {{ include "drainer.name" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
app.kubernetes.io/managed-by: tidb-operator |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
txn-batch = 20 | ||
db-type = "pb" | ||
[syncer.to] | ||
dir = "/data/pb" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mysql
cannot work out of box unless the user configure the mysql connection properly
# cpu: 100m | ||
nodeSelector: {} | ||
|
||
tolerations: [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tolerations
and affinity
is used?
Signed-off-by: Aylei <rayingecho@gmail.com>
@weekface All comments are addressed, PTAL again |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/run-e2e-in-kind |
/run-e2e-tests |
/run-e2e-in-kind |
/run-e2e-in-kind |
Signed-off-by: Aylei <rayingecho@gmail.com>
/run-e2e-in-kind |
cherry pick to release-1.0 failed |
…multiple drainers (#1160) * Add new helm chart tidb-drainer to support multiple drainer Signed-off-by: Aylei <rayingecho@gmail.com> * Explicitly pass empty string Signed-off-by: Aylei <rayingecho@gmail.com> * Address review comments Signed-off-by: Aylei <rayingecho@gmail.com>
Signed-off-by: Aylei rayingecho@gmail.com
What problem does this PR solve?
close #661
What is changed and how does it work?
Add a new helm chart
tidb-drainer
.The documentation PR: pingcap/docs#1440
The stability test and e2e-test will be added in a follow up PR.
Check List
Tests
Code changes
Related changes
Does this PR introduce a user-facing change?:
@weekface @tennix @xiaojingchen PTAL