Skip to content

Commit 739675b

Browse files
committed
chore(mysql-cluster): adjust bind params
1 parent cbed1b7 commit 739675b

14 files changed

Lines changed: 99 additions & 90 deletions

File tree

addons/mysql-cluster/8.0/chart/mysql-cluster/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
annotations:
22
category: Database
33
apiVersion: v2
4-
appVersion: 8.0.30
4+
appVersion: 8.0.35
55
dependencies:
66
- name: common
77
repository: oci://registry.drycc.cc/charts
@@ -25,4 +25,4 @@ name: mysql
2525
sources:
2626
- https://github.com/drycc/containers/tree/main/drycc/mysql
2727
- https://mysql.com
28-
version: 9.3.5
28+
version: 8.0.35
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
{{- /*
2+
Copyright Drycc Community.
3+
SPDX-License-Identifier: APACHE-2.0
4+
*/}}
5+
6+
apiVersion: apps/v1
7+
kind: Deployment
8+
metadata:
9+
name: {{ include "mysql.cluster.fullname" . }}-tools
10+
namespace: {{ include "common.names.namespace" . | quote }}
11+
spec:
12+
replicas: 1
13+
selector:
14+
matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }}
15+
app.kubernetes.io/component: mysql-cluster-tools
16+
17+
template:
18+
metadata:
19+
labels: {{- include "common.labels.standard" . | nindent 8 }}
20+
app.kubernetes.io/component: mysql-cluster-tools
21+
22+
spec:
23+
containers:
24+
- name: cluster-tools
25+
image: {{ include "cluster.image" . }}
26+
imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
27+
command:
28+
- /bin/bash
29+
- -ec
30+
- |
31+
sleep infinity
32+
env:
33+
- name: MYSQL_MASTER_PORT_NUMBER
34+
value: {{ .Values.primary.service.ports.mysql | quote }}
35+
- name: MYSQL_MASTER_ROOT_USER
36+
value: "root"
37+
- name: MYSQL_ROOT_PASSWORD
38+
valueFrom:
39+
secretKeyRef:
40+
name: {{ template "mysql.secretName" . }}
41+
key: mysql-root-password

addons/mysql-cluster/8.0/chart/mysql-cluster/templates/cluster/job.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@ spec:
6767
" > /tmp/slave.sql
6868
mysql -h${HOST_1} -P${MYSQL_MASTER_PORT_NUMBER} -uroot -p${MYSQL_ROOT_PASSWORD} < /tmp/slave.sql
6969
mysql -h${HOST_2} -P${MYSQL_MASTER_PORT_NUMBER} -uroot -p${MYSQL_ROOT_PASSWORD} < /tmp/slave.sql
70-
70+
mysql -h${HOST_0} -P${MYSQL_MASTER_PORT_NUMBER} -uroot -p${MYSQL_ROOT_PASSWORD} -e "GRANT ALL PRIVILEGES ON *.* TO administrator@'%' WITH GRANT OPTION;flush privileges;"
71+
7172
env:
7273
- name: DRYCC_DEBUG
7374
value: {{ ternary "true" "false" (or .Values.image.debug .Values.diagnosticMode.enabled) | quote }}

addons/mysql-cluster/8.0/chart/mysql-cluster/templates/secrets.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ metadata:
4646
{{- end }}
4747
type: servicebinding.io/mysql
4848
data:
49-
provider: {{ print "bitnami" | b64enc | quote }}
49+
provider: {{ print "drycc" | b64enc | quote }}
5050
type: {{ print "mysql" | b64enc | quote }}
5151
host: {{ print $host | b64enc | quote }}
5252
port: {{ print $port | b64enc | quote }}
@@ -60,7 +60,7 @@ data:
6060
apiVersion: v1
6161
kind: Secret
6262
metadata:
63-
name: {{ include "common.names.fullname" . }}-svcbind-custom-user
63+
name: {{ include "common.names.fullname" . }}-svcbind-administrator-user
6464
namespace: {{ .Release.Namespace | quote }}
6565
labels: {{- include "common.labels.standard" . | nindent 4 }}
6666
{{- if .Values.commonLabels }}

addons/mysql-cluster/8.0/chart/mysql-cluster/values.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,11 +113,11 @@ auth:
113113
## @param auth.database Name for a custom database to create
114114
## ref: https://github.com/drycc/containers/tree/main/drycc/mysql#creating-a-database-on-first-run
115115
##
116-
database: "mx_database"
116+
database: "mondb"
117117
## @param auth.username Name for a custom user to create
118118
## ref: https://github.com/drycc/containers/tree/main/drycc/mysql#creating-a-database-user-on-first-run
119119
##
120-
username: "mx111"
120+
username: "administrator"
121121
## @param auth.password Password for the new user. Ignored if existing secret is provided
122122
##
123123
password: ""
@@ -127,7 +127,7 @@ auth:
127127
replicationUser: replicator
128128
## @param auth.replicationPassword MySQL replication user password. Ignored if existing secret is provided
129129
##
130-
replicationPassword: "user4_repUU"
130+
replicationPassword: ""
131131
## @param auth.existingSecret Use existing secret for password details. The secret has to contain the keys `mysql-root-password`, `mysql-replication-password` and `mysql-password`
132132
## NOTE: When it's set the auth.rootPassword, auth.password, auth.replicationPassword are ignored.
133133
##
@@ -244,6 +244,7 @@ primary:
244244
disabled_storage_engines="MyISAM,BLACKHOLE,FEDERATED,ARCHIVE,MEMORY"
245245
sql_require_primary_key=ON
246246
log_error_suppression_list='MY-013360'
247+
binlog_transaction_dependency_tracking=WRITESET
247248
# Replication
248249
249250
log_bin=mysql-bin
@@ -603,6 +604,7 @@ cluster:
603604
digest: ""
604605
pullPolicy: IfNotPresent
605606

607+
606608
router:
607609
## @param router.name Name of the router
608610
##

addons/mysql-cluster/8.0/meta.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ tags: mysql-cluster
1313
bindable: true
1414
instances_retrievable: true
1515
bindings_retrievable: true
16-
plan_updateable: false
16+
plan_updateable: true
1717
allow_parameters:
1818
- name: "networkPolicy.allowNamespaces"
1919
required: false
2020
description: "networkPolicy allowNamespaces config for values.yaml"
2121
- name: "router.service.type"
2222
required: false
2323
description: "service type config for values.yaml"
24-
archive: false
24+
archive: false

addons/mysql-cluster/8.0/plans/standard-10/bind.yaml

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,31 +9,26 @@ credential:
99
- name: HOST
1010
valueFrom:
1111
serviceRef:
12-
name: {{ include "common.names.fullname" . }}
12+
name: {{ include "common.names.fullname" . }}-router
1313
jsonpath: '{ .spec.clusterIP }'
1414
{{- end }}
15-
- name: DADABASE
16-
valueFrom:
17-
secretKeyRef:
18-
name: {{ template "common.names.fullname" . }}-svcbind-custom-user
19-
jsonpath: '{ .data.database }'
2015
- name: PASSWORD
2116
valueFrom:
2217
secretKeyRef:
23-
name: {{ template "common.names.fullname" . }}-svcbind-custom-user
24-
jsonpath: '{ .data.username }'
18+
name: {{ template "common.names.fullname" . }}-svcbind-administrator-user
19+
jsonpath: '{ .data.password }'
2520
- name: USERNAME
2621
valueFrom:
2722
secretKeyRef:
28-
name: {{ template "common.names.fullname" . }}-svcbind-custom-user
23+
name: {{ template "common.names.fullname" . }}-svcbind-administrator-user
2924
jsonpath: '{ .data.username }'
3025
- name: READONLY_PORT
3126
valueFrom:
3227
secretKeyRef:
33-
name: {{ template "common.names.fullname" . }}-svcbind-custom-user
28+
name: {{ template "common.names.fullname" . }}-svcbind-administrator-user
3429
jsonpath: '{ .data.portro }'
3530
- name: READWRITE_PORT
3631
valueFrom:
3732
secretKeyRef:
38-
name: {{ template "common.names.fullname" . }}-svcbind-custom-user
33+
name: {{ template "common.names.fullname" . }}-svcbind-administrator-user
3934
jsonpath: '{ .data.portrw }'

addons/mysql-cluster/8.0/plans/standard-10/values.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ primary:
1616
resources:
1717
limits:
1818
cpu: 1000m
19-
memory: 1024Mi
19+
memory: 2048Mi
2020
requests:
2121
cpu: 1000m
22-
memory: 1024Mi
22+
memory: 2048Mi
2323

2424

2525
## @section Persistence parameters

addons/mysql-cluster/8.0/plans/standard-100/bind.yaml

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,31 +9,26 @@ credential:
99
- name: HOST
1010
valueFrom:
1111
serviceRef:
12-
name: {{ include "common.names.fullname" . }}
12+
name: {{ include "common.names.fullname" . }}-router
1313
jsonpath: '{ .spec.clusterIP }'
14-
{{- end }}
15-
- name: DADABASE
16-
valueFrom:
17-
secretKeyRef:
18-
name: {{ template "common.names.fullname" . }}-svcbind-custom-user
19-
jsonpath: '{ .data.database }'
14+
{{- end }}
2015
- name: PASSWORD
2116
valueFrom:
2217
secretKeyRef:
23-
name: {{ template "common.names.fullname" . }}-svcbind-custom-user
24-
jsonpath: '{ .data.username }'
18+
name: {{ template "common.names.fullname" . }}-svcbind-administrator-user
19+
jsonpath: '{ .data.password }'
2520
- name: USERNAME
2621
valueFrom:
2722
secretKeyRef:
28-
name: {{ template "common.names.fullname" . }}-svcbind-custom-user
23+
name: {{ template "common.names.fullname" . }}-svcbind-administrator-user
2924
jsonpath: '{ .data.username }'
3025
- name: READONLY_PORT
3126
valueFrom:
3227
secretKeyRef:
33-
name: {{ template "common.names.fullname" . }}-svcbind-custom-user
28+
name: {{ template "common.names.fullname" . }}-svcbind-administrator-user
3429
jsonpath: '{ .data.portro }'
3530
- name: READWRITE_PORT
3631
valueFrom:
3732
secretKeyRef:
38-
name: {{ template "common.names.fullname" . }}-svcbind-custom-user
33+
name: {{ template "common.names.fullname" . }}-svcbind-administrator-user
3934
jsonpath: '{ .data.portrw }'

addons/mysql-cluster/8.0/plans/standard-20/bind.yaml

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,31 +9,26 @@ credential:
99
- name: HOST
1010
valueFrom:
1111
serviceRef:
12-
name: {{ include "common.names.fullname" . }}
12+
name: {{ include "common.names.fullname" . }}-router
1313
jsonpath: '{ .spec.clusterIP }'
1414
{{- end }}
15-
- name: DADABASE
16-
valueFrom:
17-
secretKeyRef:
18-
name: {{ template "common.names.fullname" . }}-svcbind-custom-user
19-
jsonpath: '{ .data.database }'
2015
- name: PASSWORD
2116
valueFrom:
2217
secretKeyRef:
23-
name: {{ template "common.names.fullname" . }}-svcbind-custom-user
24-
jsonpath: '{ .data.username }'
18+
name: {{ template "common.names.fullname" . }}-svcbind-administrator-user
19+
jsonpath: '{ .data.password }'
2520
- name: USERNAME
2621
valueFrom:
2722
secretKeyRef:
28-
name: {{ template "common.names.fullname" . }}-svcbind-custom-user
23+
name: {{ template "common.names.fullname" . }}-svcbind-administrator-user
2924
jsonpath: '{ .data.username }'
3025
- name: READONLY_PORT
3126
valueFrom:
3227
secretKeyRef:
33-
name: {{ template "common.names.fullname" . }}-svcbind-custom-user
28+
name: {{ template "common.names.fullname" . }}-svcbind-administrator-user
3429
jsonpath: '{ .data.portro }'
3530
- name: READWRITE_PORT
3631
valueFrom:
3732
secretKeyRef:
38-
name: {{ template "common.names.fullname" . }}-svcbind-custom-user
33+
name: {{ template "common.names.fullname" . }}-svcbind-administrator-user
3934
jsonpath: '{ .data.portrw }'

0 commit comments

Comments
 (0)