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

Add new helm chart tidb-drainer to support multiple drainer #744

Merged
merged 8 commits into from
Aug 12, 2019

Conversation

aylei
Copy link
Contributor

@aylei aylei commented Aug 8, 2019

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

  • Manual test (add detailed scripts or steps below)

Code changes

  • Has Helm charts change

Related changes

  • Need to cherry-pick to the release branch
  • Need to update the documentation

Does this PR introduce a user-facing change?:

Introduce a new helm chart,  tidb-drainer, to facilitate the multiple drainers management.

@weekface @tennix @xiaojingchen PTAL

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=
Copy link
Contributor

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.

Copy link
Contributor Author

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
Copy link
Contributor

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.

Copy link
Contributor Author

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)

@weekface
Copy link
Contributor

weekface commented Aug 9, 2019

You should create two issues to track things:

  • add e2e tests
  • add chart release
  • other?

app.kubernetes.io/component: drainer
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
data:
{{ include "drainer-configmap.data" . | indent 2 }}
Copy link
Contributor

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
Copy link
Contributor

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
Copy link
Contributor

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
Copy link
Contributor

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"
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

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: []
Copy link
Contributor

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>
@aylei
Copy link
Contributor Author

aylei commented Aug 9, 2019

@weekface All comments are addressed, PTAL again

@aylei aylei requested review from gregwebs and weekface August 9, 2019 05:22
weekface
weekface previously approved these changes Aug 9, 2019
Copy link
Contributor

@weekface weekface left a comment

Choose a reason for hiding this comment

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

LGTM

tennix
tennix previously approved these changes Aug 9, 2019
Copy link
Member

@tennix tennix left a comment

Choose a reason for hiding this comment

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

LGTM

@weekface
Copy link
Contributor

weekface commented Aug 9, 2019

/run-e2e-in-kind

@CLAassistant
Copy link

CLAassistant commented Aug 9, 2019

CLA assistant check
All committers have signed the CLA.

@aylei
Copy link
Contributor Author

aylei commented Aug 11, 2019

/run-e2e-tests

@aylei
Copy link
Contributor Author

aylei commented Aug 11, 2019

/run-e2e-in-kind

@aylei
Copy link
Contributor Author

aylei commented Aug 12, 2019

/run-e2e-in-kind

Signed-off-by: Aylei <rayingecho@gmail.com>
@aylei aylei dismissed stale reviews from tennix and weekface via c380fd9 August 12, 2019 02:47
@aylei
Copy link
Contributor Author

aylei commented Aug 12, 2019

/run-e2e-in-kind

@aylei aylei requested review from weekface and tennix August 12, 2019 02:51
@aylei
Copy link
Contributor Author

aylei commented Aug 12, 2019

@tennix @weekface I've fixed a fmt error which blocks the CI, PTAL again

@aylei aylei merged commit 316b42e into pingcap:master Aug 12, 2019
@sre-bot
Copy link
Contributor

sre-bot commented Aug 12, 2019

cherry pick to release-1.0 failed

aylei added a commit that referenced this pull request Nov 15, 2019
…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>
yahonda pushed a commit that referenced this pull request Dec 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support multiple drainers
7 participants