Skip to content

Commit

Permalink
support passing raw toml config for tiflash (pingcap#3355)
Browse files Browse the repository at this point in the history
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
```
  • Loading branch information
july2993 authored and howardlau1999 committed Oct 20, 2020
1 parent 6d64581 commit b3f341f
Show file tree
Hide file tree
Showing 19 changed files with 809 additions and 1,663 deletions.
99 changes: 95 additions & 4 deletions docs/api-references/docs.md
Expand Up @@ -12757,12 +12757,35 @@ kubectl create secret generic <clusterName>-tidb-client-secret &ndash;namespace=
</tr>
</tbody>
</table>
<h3 id="tiflashconfig">TiFlashConfig</h3>
<h3 id="tiflashcommonconfigwraper">TiFlashCommonConfigWraper</h3>
<p>
(<em>Appears on:</em>
<a href="#tiflashspec">TiFlashSpec</a>)
<a href="#tiflashconfigwraper">TiFlashConfigWraper</a>)
</p>
<p>
</p>
<table>
<thead>
<tr>
<th>Field</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<code>GenericConfig</code></br>
<em>
github.com/pingcap/tidb-operator/pkg/util/config.GenericConfig
</em>
</td>
<td>
</td>
</tr>
</tbody>
</table>
<h3 id="tiflashconfig">TiFlashConfig</h3>
<p>
<p>TiFlashConfig is the configuration of TiFlash.</p>
</p>
<table>
Expand Down Expand Up @@ -12803,6 +12826,74 @@ ProxyConfig
</tr>
</tbody>
</table>
<h3 id="tiflashconfigwraper">TiFlashConfigWraper</h3>
<p>
(<em>Appears on:</em>
<a href="#tiflashspec">TiFlashSpec</a>)
</p>
<p>
</p>
<table>
<thead>
<tr>
<th>Field</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<code>config</code></br>
<em>
<a href="#tiflashcommonconfigwraper">
TiFlashCommonConfigWraper
</a>
</em>
</td>
<td>
</td>
</tr>
<tr>
<td>
<code>proxy</code></br>
<em>
<a href="#tiflashproxyconfigwraper">
TiFlashProxyConfigWraper
</a>
</em>
</td>
<td>
</td>
</tr>
</tbody>
</table>
<h3 id="tiflashproxyconfigwraper">TiFlashProxyConfigWraper</h3>
<p>
(<em>Appears on:</em>
<a href="#tiflashconfigwraper">TiFlashConfigWraper</a>)
</p>
<p>
</p>
<table>
<thead>
<tr>
<th>Field</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<code>GenericConfig</code></br>
<em>
github.com/pingcap/tidb-operator/pkg/util/config.GenericConfig
</em>
</td>
<td>
</td>
</tr>
</tbody>
</table>
<h3 id="tiflashspec">TiFlashSpec</h3>
<p>
(<em>Appears on:</em>
Expand Down Expand Up @@ -12928,8 +13019,8 @@ TiFlash supports multiple disks.</p>
<td>
<code>config</code></br>
<em>
<a href="#tiflashconfig">
TiFlashConfig
<a href="#tiflashconfigwraper">
TiFlashConfigWraper
</a>
</em>
</td>
Expand Down
1 change: 1 addition & 0 deletions go.mod
Expand Up @@ -93,6 +93,7 @@ require (
k8s.io/utils v0.0.0-20190801114015-581e00157fb1
sigs.k8s.io/apiserver-builder-alpha/cmd v0.0.0-20191113095113-4493943d2568
sigs.k8s.io/controller-runtime v0.4.0
sigs.k8s.io/yaml v1.1.0
)

replace github.com/renstrom/dedent => github.com/lithammer/dedent v1.1.0
Expand Down

0 comments on commit b3f341f

Please sign in to comment.