Skip to content

Commit 3cd8fd8

Browse files
committed
K8SPXC-1071 - Replace proxysql-admin with percona-scheduler-admin for proxysql
1 parent a14700d commit 3cd8fd8

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

pkg/controller/pxc/users.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,7 @@ func (r *ReconcilePerconaXtraDBCluster) syncPXCUsersWithProxySQL(cr *api.Percona
496496
return errors.Wrap(err, "get proxysql pod")
497497
}
498498
var errb, outb bytes.Buffer
499-
err = r.clientcmd.Exec(&pod, "proxysql", []string{"proxysql-admin", "--syncusers", "--add-query-rule"}, nil, &outb, &errb, false)
499+
err = r.clientcmd.Exec(&pod, "proxysql", []string{"percona-scheduler-admin", "--config-file=/etc/config.toml", "--syncusers", "--add-query-rule"}, nil, &outb, &errb, false)
500500
if err != nil {
501501
return errors.Errorf("exec syncusers: %v / %s / %s", err, outb.String(), errb.String())
502502
}

pkg/pxc/app/statefulset/proxysql.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,16 @@ func (c *Proxy) SidecarContainers(spec *api.PodSpec, secrets string, cr *api.Per
165165
"-service=$(PXC_SERVICE)",
166166
},
167167
Resources: spec.SidecarResources,
168+
VolumeMounts: []corev1.VolumeMount{
169+
{
170+
Name: "ssl",
171+
MountPath: "/etc/proxysql/ssl",
172+
},
173+
{
174+
Name: "ssl-internal",
175+
MountPath: "/etc/proxysql/ssl-internal",
176+
},
177+
},
168178
Env: []corev1.EnvVar{
169179
{
170180
Name: "PXC_SERVICE",

pkg/pxc/queries/queries.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const (
2929

3030
// value of writer group is hardcoded in ProxySQL config inside docker image
3131
// https://github.com/percona/percona-docker/blob/pxc-operator-1.3.0/proxysql/dockerdir/etc/proxysql-admin.cnf#L23
32-
const writerID = 11
32+
const writerID = 100
3333

3434
type Database struct {
3535
db *sql.DB

0 commit comments

Comments
 (0)