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 adding additional pod annotations for PD/TiKV/TiDB #500

Merged
merged 6 commits into from
May 21, 2019

Conversation

LinuxGit
Copy link
Contributor

@LinuxGit LinuxGit commented May 17, 2019

What problem does this PR solve?

Support adding additional pod annotations for PD/TiKV/TiDB.
We could add pod annotation fluentbit.io/parser: pingcap_log for PD/TiKV/TiDB pod, so fluentbit knows that the pod log should be processed using the pre-defined parser called pingcap_log .
refer: https://docs.fluentbit.io/manual/filter/kubernetes#kubernetes-annotations

What is changed and how it works?

At the server side, Annotations field was added in TidbClusterSpec's Pod Spec (PDSpec, TiKVSpec and TiDBSpec). If Annotations field is not empty, the PD/TiKV/TiDB statefulset will add the annotation to PodTemplateSpec's Annotations field.

At the client side, you could add additional annotations in Helm values file charts/tidb-cluster/values.yaml.

Check List

Tests

  • [] Unit test
  • [] E2E test

The Unit and E2E test cases will be tracked in issue #505.

Code changes

  • Has Helm charts change ✔️
  • Has Go code change ✔️

Does this PR introduce a user-facing change?:

Support adding additional pod annotations for PD/TiKV/TiDB,  e.g. [fluentbit.io/parser](https://docs.fluentbit.io/manual/filter/kubernetes#kubernetes-annotations).

@LinuxGit LinuxGit requested review from tennix, weekface and aylei May 17, 2019 11:17
aylei
aylei previously approved these changes May 18, 2019
Copy link
Contributor

@aylei aylei 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

  • you should run ./hack/codegen.sh to generate the deepcopy files
  • This pr need to add unit and e2e test cases. Now, you can open a new issue to track it and do it on another pr.

@LinuxGit
Copy link
Contributor Author

  • you should run ./hack/codegen.sh to generate the deepcopy files
  • This pr need to add unit and e2e test cases. Now, you can open a new issue to track it and do it on another pr.

OK. I've add generated deepcopy file, andd add a issue for tracing e2e cases.#505.

Copy link
Contributor

@onlymellb onlymellb left a comment

Choose a reason for hiding this comment

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

LGTM

@LinuxGit
Copy link
Contributor Author

/run-e2e-tests

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

@LinuxGit
Copy link
Contributor Author

/run-e2e-tests

@weekface
Copy link
Contributor

add a release note like this pr does: #479

@LinuxGit LinuxGit changed the title allow custom pod annotations Support adding additional pod annotations for PD/TiKV/TiDB May 21, 2019
@LinuxGit
Copy link
Contributor Author

/run-e2e-tests

@LinuxGit
Copy link
Contributor Author

add a release note like this pr does: #479

OK. I've refined the PR description.

@weekface weekface merged commit 57d9075 into pingcap:master May 21, 2019
@LinuxGit LinuxGit deleted the Louis/custom-annotation branch May 21, 2019 15:11
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.

5 participants