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 passing raw toml config for tiflash #3355
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3355 +/- ##
==========================================
- Coverage 50.28% 49.90% -0.39%
==========================================
Files 163 163
Lines 16517 16408 -109
==========================================
- Hits 8306 8188 -118
+ Misses 7411 7410 -1
- Partials 800 810 +10
Flags with carried forward coverage won't be shown. Click here to find out more. |
|
||
for _, test := range tests { | ||
t.Run(test.name, func(t *testing.T) { | ||
setTiFlashConfigDefault(&test.config, "", "test", "test") |
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.
Note the previous code for custom config
case
config
and expect
both setted as customTiFlashLogConfig
and no deep copy(CommonConfing and ProxyConfig is the same object for config
and expect
)
so config
will always equal expect
after calling this.
73b672d
to
26eca0a
Compare
26eca0a
to
5416168
Compare
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
@DanielZhangQD @lonng PTAL |
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
@lonng PTAL |
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
/merge |
@lonng Oops! This PR requires at least 2 LGTMs to merge. The current number of |
/test pull-e2e-kind |
1 similar comment
/test pull-e2e-kind |
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
cherry pick to release-1.1 in PR #3368 |
follow up pingcap#3327 origin way to set config: ```yaml tiflash: baseImage: pingcap/tiflash maxFailoverCount: 3 replicas: 1 storageClaims: - resources: requests: storage: 1Gi -- # storageClassName: local-storage # requests: # storage: "1Gi" config: config: logger: level: "warn" count: 9 proxy: log-level: "warn" gc: batch-keys: 501 ``` after this pr, support pass config like this: ```yaml tiflash: baseImage: pingcap/tiflash maxFailoverCount: 3 replicas: 1 storageClaims: - resources: requests: storage: 1Gi -- # storageClassName: local-storage # requests: # storage: "1Gi" config: config: | [logger] level = "warn" count = 9 proxy: | log-level = "warn" [gc] batch-keys = 501 ```
follow up pingcap#3327 origin way to set config: ```yaml tiflash: baseImage: pingcap/tiflash maxFailoverCount: 3 replicas: 1 storageClaims: - resources: requests: storage: 1Gi -- # storageClassName: local-storage # requests: # storage: "1Gi" config: config: logger: level: "warn" count: 9 proxy: log-level: "warn" gc: batch-keys: 501 ``` after this pr, support pass config like this: ```yaml tiflash: baseImage: pingcap/tiflash maxFailoverCount: 3 replicas: 1 storageClaims: - resources: requests: storage: 1Gi -- # storageClassName: local-storage # requests: # storage: "1Gi" config: config: | [logger] level = "warn" count = 9 proxy: | log-level = "warn" [gc] batch-keys = 501 ```
follow up pingcap#3327 origin way to set config: ```yaml tiflash: baseImage: pingcap/tiflash maxFailoverCount: 3 replicas: 1 storageClaims: - resources: requests: storage: 1Gi -- # storageClassName: local-storage # requests: # storage: "1Gi" config: config: logger: level: "warn" count: 9 proxy: log-level: "warn" gc: batch-keys: 501 ``` after this pr, support pass config like this: ```yaml tiflash: baseImage: pingcap/tiflash maxFailoverCount: 3 replicas: 1 storageClaims: - resources: requests: storage: 1Gi -- # storageClassName: local-storage # requests: # storage: "1Gi" config: config: | [logger] level = "warn" count = 9 proxy: | log-level = "warn" [gc] batch-keys = 501 ```
follow up pingcap#3327 origin way to set config: ```yaml tiflash: baseImage: pingcap/tiflash maxFailoverCount: 3 replicas: 1 storageClaims: - resources: requests: storage: 1Gi -- # storageClassName: local-storage # requests: # storage: "1Gi" config: config: logger: level: "warn" count: 9 proxy: log-level: "warn" gc: batch-keys: 501 ``` after this pr, support pass config like this: ```yaml tiflash: baseImage: pingcap/tiflash maxFailoverCount: 3 replicas: 1 storageClaims: - resources: requests: storage: 1Gi -- # storageClassName: local-storage # requests: # storage: "1Gi" config: config: | [logger] level = "warn" count = 9 proxy: | log-level = "warn" [gc] batch-keys = 501 ```
What problem does this PR solve?
support passing raw toml config for tiflash
follow up #3327
What is changed and how does it work?
origin way to set config:
after this pr, support pass config like this:
Check List
Tests
Deploy cluster using the flowing yaml(one use raw, one use origin way),
Check pos normal and config in configmaps as expect
tidb-cluster.yaml CLICK ME
tidb-cluster-ym.yamlCLICK ME
Related changes
Does this PR introduce a user-facing change?: