Skip to content

Commit 6bcb090

Browse files
committed
fix quote issues within template file
1 parent 219e1ad commit 6bcb090

5 files changed

Lines changed: 71 additions & 91 deletions

File tree

proxysql/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
apiVersion: v1
33
name: proxysql
44
description: ProxySQL Configuration
5-
version: 0.1.6
5+
version: 0.1.7

proxysql/config/proxysql.cnf

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
{{ $proxysql := .Values.configmap }}
2+
datadir = "{{ $proxysql.datadir }}"
3+
errorlog = "{{ $proxysql.errorlog }}"
4+
5+
admin_variables = { {{- range $key, $value := $proxysql.admin_variables }}
6+
{{ $key }} = "{{ $value }}" {{- end }}
7+
}
8+
9+
mysql_variables = { {{- range $key, $value := $proxysql.mysql_variables }}
10+
{{ $key }} = "{{ $value }}" {{- end }}
11+
}
12+
13+
mysql_users = ( {{- range $key, $mysql_user := $proxysql.mysql_users }}
14+
{
15+
username = "{{ default $key $mysql_user.username }}"
16+
default_hostgroup = "{{ default 0 $mysql_user.default_hostgroup }}"
17+
active = "{{ default 1 $mysql_user.active }}"
18+
password = "{{ $mysql_user.password }}"
19+
}, {{- end }}
20+
)
21+
22+
mysql_servers = ( {{- range $key, $mysql_server := $proxysql.mysql_servers }}
23+
{
24+
hostgroup_id = "{{ default 0 $mysql_server.hostgroup_id }}"
25+
hostname = "{{ default $key $mysql_server.hostname}}"
26+
port = "{{ default 3306 $mysql_server.port }}"
27+
use_ssl = "{{ default 1 $mysql_server.use_ssl }}"
28+
weight = "{{ default 1 $mysql_server.weight }}"
29+
comment = "{{ $mysql_server.comment }}"
30+
}, {{- end }}
31+
)
32+
33+
34+
mysql_query_rules = ( {{- range $key, $value := $proxysql.mysql_query_rules }}
35+
{{ $key }} = "{{ $value }}" {{- end }}
36+
)
37+
38+
scheduler = ( {{- range $key, $value := $proxysql.scheduler }}
39+
{{ $key }} = "{{ $value }}" {{- end }}
40+
)
41+
42+
mysql_replication_hostgroups = ( {{- range $mysql_replication_hostgroup := $proxysql.mysql_replication_hostgroups }}
43+
{
44+
writer_hostgroup = "{{ default 0 $mysql_replication_hostgroup.writer_hostgroup }}"
45+
reader_hostgroup = "{{ default 1 $mysql_replication_hostgroup.reader_hostgroup }}"
46+
comment = "{{ $mysql_replication_hostgroup.comment }}"
47+
}, {{- end }}
48+
)

proxysql/config/proxysql.conf

Lines changed: 0 additions & 68 deletions
This file was deleted.

proxysql/templates/configmap.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ metadata:
1010
{{ $key }}: {{ $value }}
1111
{{- end }}
1212
data:
13-
{{ tpl (.Files.Glob "config/proxysql.conf").AsConfig . | indent 2 }}
13+
{{ tpl (.Files.Glob "config/proxysql.cnf").AsConfig . | indent 2 }}

proxysql/values.yaml

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -58,33 +58,33 @@ configmap:
5858
admin_credentials: ""
5959
mysql_ifaces: "0.0.0.0:6032"
6060
mysql_variables:
61-
threads: 8
62-
max_connections: 16384
63-
default_query_delay: 0
64-
default_query_timeout: 36000000
61+
threads: "8"
62+
max_connections: "16384"
63+
default_query_delay: "0"
64+
default_query_timeout: "36000000"
6565
have_compress: true
66-
poll_timeout: 2000
66+
poll_timeout: "2000"
6767
interfaces: "0.0.0.0:6033;/tmp/proxysql_ds/proxysql.sock"
6868
default_schema: "information_schema"
69-
stacksize: 1048576
69+
stacksize: "1048576"
7070
server_version: "5.7"
7171
monitor_username: ""
7272
monitor_password: ""
73-
monitor_history: 600000
74-
monitor_connect_interval: 60000
75-
monitor_ping_interval: 10000
76-
monitor_read_only_interval: 1500
77-
monitor_read_only_timeout: 500
78-
ping_interval_server_msec: 120000
79-
commands_stats: true
80-
sessions_sort: true
81-
connect_retries_on_failure: 10
82-
monitor_connect_timeout: 5000
83-
monitor_ping_timeout: 5000
84-
monitor_replication_lag_timeout: 10000
85-
connect_timeout_server: 10000
86-
ping_timeout_server: 2500
87-
long_query_time: 5000
73+
monitor_history: "600000"
74+
monitor_connect_interval: "60000"
75+
monitor_ping_interval: "10000"
76+
monitor_read_only_interval: "1500"
77+
monitor_read_only_timeout: "500"
78+
ping_interval_server_msec: "120000"
79+
commands_stats: "true"
80+
sessions_sort: "true"
81+
connect_retries_on_failure: "10"
82+
monitor_connect_timeout: "5000"
83+
monitor_ping_timeout: "5000"
84+
monitor_replication_lag_timeout: "10000"
85+
connect_timeout_server: "10000"
86+
ping_timeout_server: "2500"
87+
long_query_time: "5000"
8888
# defaults are defined within configfile template
8989
mysql_servers: {}
9090
mysql_users: {}

0 commit comments

Comments
 (0)