Skip to content

Commit

Permalink
Support plugin start argument for tidb instance (#412)
Browse files Browse the repository at this point in the history
* Support plugin start argument for tidb instance

* fix typo

* change plugin.list from string to array
  • Loading branch information
sdojjy committed Apr 22, 2019
1 parent d953b0c commit 2ad0a47
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
4 changes: 4 additions & 0 deletions charts/tidb-cluster/templates/scripts/_start_tidb.sh.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ then
ARGS="${ARGS} --log-slow-query=${SLOW_LOG_FILE:-}"
fi

{{- if .Values.tidb.plugin.enable | default false }}
ARGS="${ARGS} --plugin-dir {{ .Values.tidb.plugin.directory }} --plugin-load {{ .Values.tidb.plugin.list | join "," }} "
{{- end }}

echo "start tidb-server ..."
echo "/tidb-server ${ARGS}"
exec /tidb-server ${ARGS}
9 changes: 9 additions & 0 deletions charts/tidb-cluster/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,15 @@ tidb:
cpu: 20m
memory: 5Mi

# tidb plugin configuration
plugin:
# enable plugin or not
enable: false
# the start argument to specify the folder containing
directory: /plugins
# the start argument to specify the plugin id (name "-" version) that needs to be loaded, e.g. 'conn_limit-1'.
list: ["whitelist-1"]

# mysqlClient is used to set password for TiDB
# it must has Python MySQL client installed
mysqlClient:
Expand Down

0 comments on commit 2ad0a47

Please sign in to comment.