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

Support updating configuraion on the fly #479

Merged
merged 13 commits into from
May 16, 2019
Merged

Conversation

aylei
Copy link
Contributor

@aylei aylei commented May 9, 2019

What problem does this PR solve?

fix #225

What is changed and how it works?

At the server side, A set of special annotations are introduced, if these annotations present, the PD/TiKV/TiDB statefulset will use the annotation to concat configmap name.

At the client side, if feature gate EnableConfigMapRollout enabled, the client will generate SHA256 digest for configmap data and append the digest in configmap name, while keep the annotations mentioned above in sync.

After a configuration change, the digest changed so the configmap name and annotations changed, the statefulsets will use the new configmap name due to the annotation change, a rolling-update will performed consequently.

Check List

Tests

  • Unit test
  • E2E test
  • Stability test

The stability test case will be more complicated (which may include mis-configuring scenario) and need more discussion, which will be tracked in another issue.

Code changes

  • Has Helm charts change ✔️
  • Has Go code change ✔️
  • Has CI related scripts change ✔️
  • Has documents change ✔️

Release Note

Introduce ConfigMap rollout management. With the feature gate open, configuration file changes will be automatically applied to the cluster via a rolling update.

Signed-off-by: Aylei rayingecho@gmail.com

Signed-off-by: Aylei <rayingecho@gmail.com>
@aylei
Copy link
Contributor Author

aylei commented May 9, 2019

/run-e2e-tests

Signed-off-by: Aylei <rayingecho@gmail.com>
@aylei
Copy link
Contributor Author

aylei commented May 9, 2019

/run-e2e-tests

@aylei
Copy link
Contributor Author

aylei commented May 9, 2019

/run-e2e-tests

Signed-off-by: Aylei <rayingecho@gmail.com>
@aylei
Copy link
Contributor Author

aylei commented May 10, 2019

/run-e2e-tests

Signed-off-by: Aylei <rayingecho@gmail.com>
@aylei
Copy link
Contributor Author

aylei commented May 10, 2019

/run-e2e-tests

1 similar comment
@aylei
Copy link
Contributor Author

aylei commented May 10, 2019

/run-e2e-tests

Signed-off-by: Aylei <rayingecho@gmail.com>
@aylei
Copy link
Contributor Author

aylei commented May 10, 2019

/run-e2e-tests

Signed-off-by: Aylei <rayingecho@gmail.com>
@aylei
Copy link
Contributor Author

aylei commented May 10, 2019

/run-e2e-tests

2 similar comments
@aylei
Copy link
Contributor Author

aylei commented May 10, 2019

/run-e2e-tests

@aylei
Copy link
Contributor Author

aylei commented May 10, 2019

/run-e2e-tests

@aylei
Copy link
Contributor Author

aylei commented May 12, 2019

/run-e2e-tests

…ration check instead

Signed-off-by: Aylei <rayingecho@gmail.com>
@aylei
Copy link
Contributor Author

aylei commented May 13, 2019

/run-e2e-tests

@aylei aylei marked this pull request as ready for review May 13, 2019 12:14
@aylei
Copy link
Contributor Author

aylei commented May 13, 2019

@weekface @cofyc @tennix @xiaojingchen PTAL

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.

Do we need to add the Release notes or a user-facing change to the PR and open another cherry-pick to release-1.0 when it merged as k8s does?

kubernetes/kubernetes#75900

tests/actions.go Outdated Show resolved Hide resolved
tests/cmd/e2e/main.go Show resolved Hide resolved
Co-Authored-By: weekface <weekface@gmail.com>
Copy link
Contributor

@xiaojingchen xiaojingchen left a comment

Choose a reason for hiding this comment

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

lgtm

@xiaojingchen
Copy link
Contributor

/run-e2e-test

@aylei
Copy link
Contributor Author

aylei commented May 15, 2019

Do we need to add the Release notes or a user-facing change to the PR and open another cherry-pick to release-1.0 when it merged as k8s does?

kubernetes/kubernetes#75900

Good idea, yes I think this should be cherry-picked to the 1.0 release

Signed-off-by: Aylei <rayingecho@gmail.com>
@aylei
Copy link
Contributor Author

aylei commented May 15, 2019

/run-e2e-tests

1 similar comment
@aylei
Copy link
Contributor Author

aylei commented May 15, 2019

/run-e2e-tests

@aylei
Copy link
Contributor Author

aylei commented May 15, 2019

/run-e2e-tests

@aylei
Copy link
Contributor Author

aylei commented May 15, 2019

I've introduced the logLevel configuration parameter to validate the rolling-update of PD, PTAL @xiaojingchen @weekface

Copy link
Contributor

@xiaojingchen xiaojingchen left a comment

Choose a reason for hiding this comment

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

lgtm

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

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.

How to change the configuration of TiDB/TiKV/Pd on the fly?
4 participants