pingcap / tidb-operator

TiDB operator creates and manages TiDB clusters running in Kubernetes.
https://docs.pingcap.com/tidb-in-kubernetes/
Apache License 2.0
1.22k stars 497 forks source link

add nodeSelector support for TidbInitializer Pod #5594

Closed csuzhangxc closed 6 months ago

csuzhangxc commented 6 months ago

What problem does this PR solve?

add nodeSelector support for TidbInitializer Pod

What is changed and how does it work?

Code changes

Tests

apiVersion: pingcap.com/v1alpha1
kind: TidbInitializer
spec:
    nodeSelector:
      kubernetes.io/hostname: kind-control-plane
apiVersion: v1
kind: Pod
spec:
    nodeSelector:
      kubernetes.io/hostname: kind-control-plane

Side effects

Related changes

Release Notes

Please refer to Release Notes Language Style Guide before writing the release note.

ti-chi-bot[bot] commented 6 months ago

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Once this PR has been reviewed and has the lgtm label, please ask for approval from csuzhangxc, ensuring that each of them provides their approval before proceeding. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files: - **[OWNERS](https://github.com/pingcap/tidb-operator/blob/master/OWNERS)** Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
codecov-commenter commented 6 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 64.16%. Comparing base (c0b8880) to head (c2eec9a).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #5594 +/- ## ========================================== + Coverage 61.48% 64.16% +2.68% ========================================== Files 235 246 +11 Lines 30335 34229 +3894 ========================================== + Hits 18651 21963 +3312 - Misses 9814 10319 +505 - Partials 1870 1947 +77 ``` | [Flag](https://app.codecov.io/gh/pingcap/tidb-operator/pull/5594/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pingcap) | Coverage Δ | | |---|---|---| | [e2e](https://app.codecov.io/gh/pingcap/tidb-operator/pull/5594/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pingcap) | `33.49% <0.00%> (?)` | | | [unittest](https://app.codecov.io/gh/pingcap/tidb-operator/pull/5594/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pingcap) | `61.46% <100.00%> (-0.03%)` | :arrow_down: |
csuzhangxc commented 6 months ago

/run-all-tests

csuzhangxc commented 6 months ago

/cherry-pick release-1.5

ti-chi-bot commented 6 months ago

@csuzhangxc: once the present PR merges, I will cherry-pick it on top of release-1.5 in the new PR and assign it to you.

In response to [this](https://github.com/pingcap/tidb-operator/pull/5594#issuecomment-2024532179): >/cherry-pick release-1.5 Instructions for interacting with me using PR comments are available [here](https://prow.tidb.net/command-help). If you have questions or suggestions related to my behavior, please file an issue against the [ti-community-infra/tichi](https://github.com/ti-community-infra/tichi/issues/new?title=Prow%20issue:) repository.
csuzhangxc commented 6 months ago

/run-pull-e2e-kind-br

csuzhangxc commented 6 months ago

/run-pull-e2e-kind

ti-chi-bot commented 6 months ago

@csuzhangxc: new pull request created to branch release-1.5: #5595.

In response to [this](https://github.com/pingcap/tidb-operator/pull/5594#issuecomment-2024532179): >/cherry-pick release-1.5 Instructions for interacting with me using PR comments are available [here](https://prow.tidb.net/command-help). If you have questions or suggestions related to my behavior, please file an issue against the [ti-community-infra/tichi](https://github.com/ti-community-infra/tichi/issues/new?title=Prow%20issue:) repository.