Skip to content

Commit

Permalink
Add ability to specify flags for mysqlctld
Browse files Browse the repository at this point in the history
Signed-off-by: Matt Lord <mattalord@gmail.com>
  • Loading branch information
mattlord committed Mar 16, 2024
1 parent d259730 commit e2e5e8b
Show file tree
Hide file tree
Showing 3 changed files with 79 additions and 0 deletions.
43 changes: 43 additions & 0 deletions docs/api/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1410,6 +1410,49 @@ <h3 id="planetscale.com/v2.LockserverStatus">LockserverStatus
</tr>
</tbody>
</table>
<h3 id="planetscale.com/v2.MysqlctldSpec">MysqlctldSpec
</h3>
<p>
<p>MysqlctldSpec configures the local mysqlctld gRPC server within a tablet.</p>
</p>
<table class="table table-striped">
<thead class="thead-dark">
<tr>
<th>Field</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<code>resources</code></br>
<em>
<a href="https://v1-18.docs.kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#resourcerequirements-v1-core">
Kubernetes core/v1.ResourceRequirements
</a>
</em>
</td>
<td>
<p>Resources specify the compute resources to allocate for just the MySQL Control Daemon.</p>
</td>
</tr>
<tr>
<td>
<code>extraFlags</code></br>
<em>
map[string]string
</em>
</td>
<td>
<p>ExtraFlags can optionally be used to override default flags set by the
operator, or pass additional flags to mysqlctld. All entries must be
key-value string pairs of the form &ldquo;flag&rdquo;: &ldquo;value&rdquo;. The flag name should
not have any prefix (just &ldquo;flag&rdquo;, not &ldquo;-flag&rdquo;). To set a boolean flag,
set the string value to either &ldquo;true&rdquo; or &ldquo;false&rdquo;.</p>
</td>
</tr>
</tbody>
</table>

This comment has been minimized.

Copy link
@shlomi-noach

shlomi-noach Mar 17, 2024

Collaborator

Is this file auto-generated?

This comment has been minimized.

Copy link
@mattlord

mattlord Mar 17, 2024

Author Collaborator

Yeah, after editing pkg/apis/planetscale/v2/vitessshard_types.go:

make generate
<h3 id="planetscale.com/v2.MysqldExporterSpec">MysqldExporterSpec
</h3>
<p>
Expand Down
13 changes: 13 additions & 0 deletions pkg/apis/planetscale/v2/vitessshard_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,19 @@ type MysqldSpec struct {
ConfigOverrides string `json:"configOverrides,omitempty"`
}

// MysqlctldSpec configures the local mysqlctld gRPC server within a tablet.
type MysqlctldSpec struct {
// Resources specify the compute resources to allocate for just the MySQL Control Daemon.
Resources corev1.ResourceRequirements `json:"resources"`

// ExtraFlags can optionally be used to override default flags set by the
// operator, or pass additional flags to mysqlctld. All entries must be
// key-value string pairs of the form "flag": "value". The flag name should
// not have any prefix (just "flag", not "-flag"). To set a boolean flag,
// set the string value to either "true" or "false".
ExtraFlags map[string]string `json:"extraFlags,omitempty"`
}

// MysqldExporterSpec configures the local MySQL exporter within a tablet.
type MysqldExporterSpec struct {
// Resources specify the compute resources to allocate for just the MySQL Exporter.
Expand Down
23 changes: 23 additions & 0 deletions pkg/apis/planetscale/v2/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit e2e5e8b

Please sign in to comment.