Skip to content

Conversation

@mayankshah1607
Copy link
Member

@mayankshah1607 mayankshah1607 commented Dec 19, 2025

K8SPXC-1781 Powered by Pull Request Badge

CHANGE DESCRIPTION

Problem:
Specifying custom proxysql config leads to crashing proxysql pods

Cause:

  • Custom config is mounted as a ConfigMap in /etc/proxysql/proxysql.conf
  • proxysql-entrypoint script tries to modify this /etc/proxysql/proxysql.conf, but when it is mounted from the ConfigMap, it fails as the volume is read-only
  • This was an issue earlier as well, but a recent change in the script added errexit to the script which now causes the pods to fail

Solution:

  • Mount the ConfigMap at /etc/proxysql/custom/
  • The default proxysql.conf is always copied to /etc/proxysql/proxysql.conf as the first step
  • But if the custom config is present at /etc/proxysql/custom/ , we will copy it to /etc/proxysql/proxysql.conf replacing it from previous step
  • This way we ensure that the script never tries to modify the ConfigMap volume filesystem

CHECKLIST

Jira

  • Is the Jira ticket created and referenced properly?
  • Does the Jira ticket have the proper statuses for documentation (Needs Doc) and QA (Needs QA)?
  • Does the Jira ticket link to the proper milestone (Fix Version field)?

Tests

  • Is an E2E test/test case added for the new feature/change?
  • Are unit tests added where appropriate?
  • Are OpenShift compare files changed for E2E tests (compare/*-oc.yml)?

Config/Logging/Testability

  • Are all needed new/changed options added to default YAML files?
  • Are all needed new/changed options added to the Helm Chart?
  • Did we add proper logging messages for operator actions?
  • Did we ensure compatibility with the previous version or cluster upgrade process?
  • Does the change support oldest and newest supported PXC version?
  • Does the change support oldest and newest supported Kubernetes version?

@pull-request-size pull-request-size bot added the size/S 10-29 lines label Dec 19, 2025
@mayankshah1607 mayankshah1607 marked this pull request as ready for review December 19, 2025 08:34
eleo007
eleo007 previously approved these changes Dec 19, 2025
Signed-off-by: Mayank Shah <[email protected]>
@pull-request-size pull-request-size bot added size/L 100-499 lines and removed size/M 30-99 lines labels Dec 19, 2025
hors
hors previously approved these changes Dec 20, 2025
appc.VolumeMounts = append(appc.VolumeMounts, corev1.VolumeMount{
Name: proxyConfigVolumeName,
MountPath: "/etc/proxysql/",
MountPath: "/etc/proxysql/custom",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changing this without version check will cause a restart, no?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, yeah.. Updated

@JNKPercona
Copy link
Collaborator

Test Name Result Time
auto-tuning-8-0 passed 00:00:00
allocator-8-0 passed 00:00:00
backup-storage-tls-8-0 passed 00:00:00
cross-site-8-0 passed 00:00:00
custom-users-8-0 passed 00:00:00
demand-backup-cloud-8-0 passed 00:00:00
demand-backup-cloud-pxb-8-0 passed 00:00:00
demand-backup-encrypted-with-tls-8-0 passed 00:00:00
demand-backup-encrypted-with-tls-8-4 passed 00:00:00
demand-backup-encrypted-with-tls-pxb-8-0 passed 00:00:00
demand-backup-encrypted-with-tls-pxb-8-4 passed 00:00:00
demand-backup-8-0 passed 00:00:00
demand-backup-flow-control-8-0 passed 00:00:00
demand-backup-parallel-8-0 passed 00:00:00
demand-backup-without-passwords-8-0 passed 00:00:00
extra-pvc-8-0 passed 00:00:00
haproxy-5-7 passed 00:00:00
haproxy-8-0 passed 00:00:00
init-deploy-5-7 passed 00:00:00
init-deploy-8-0 passed 00:00:00
limits-8-0 passed 00:00:00
monitoring-2-0-8-0 passed 00:00:00
monitoring-pmm3-8-0 passed 00:00:00
one-pod-5-7 passed 00:00:00
one-pod-8-0 passed 00:00:00
pitr-8-0 passed 00:00:00
pitr-8-4 passed 00:41:21
pitr-pxb-8-0 passed 00:00:00
pitr-pxb-8-4 passed 00:00:00
pitr-gap-errors-8-0 passed 00:00:00
pitr-gap-errors-8-4 passed 00:00:00
proxy-protocol-8-0 passed 00:00:00
proxy-switch-8-0 passed 00:00:00
proxysql-sidecar-res-limits-8-0 passed 00:00:00
proxysql-scheduler-8-0 passed 00:00:00
pvc-resize-5-7 passed 00:00:00
pvc-resize-8-0 passed 00:00:00
recreate-8-0 passed 00:00:00
restore-to-encrypted-cluster-8-0 passed 00:00:00
restore-to-encrypted-cluster-8-4 passed 00:00:00
restore-to-encrypted-cluster-pxb-8-0 passed 00:00:00
scaling-proxysql-8-0 passed 00:00:00
scaling-8-0 passed 00:00:00
scheduled-backup-5-7 passed 00:00:00
scheduled-backup-8-0 passed 00:00:00
security-context-8-0 passed 00:00:00
smart-update1-8-0 passed 00:00:00
smart-update2-8-0 passed 00:00:00
storage-8-0 passed 00:00:00
tls-issue-cert-manager-ref-8-0 passed 00:00:00
tls-issue-cert-manager-8-0 passed 00:00:00
tls-issue-self-8-0 passed 00:00:00
upgrade-consistency-8-0 passed 00:00:00
upgrade-haproxy-5-7 passed 00:00:00
upgrade-haproxy-8-0 passed 00:00:00
upgrade-proxysql-5-7 passed 00:00:00
upgrade-proxysql-8-0 passed 00:00:00
users-5-7 passed 00:00:00
users-8-0 passed 00:00:00
users-scheduler-8-4 passed 00:00:00
validation-hook-8-0 passed 00:00:00
Summary Value
Tests Run 61/61
Job Duration 01:04:58
Total Test Time 00:41:21

commit: d401e0a
image: perconalab/percona-xtradb-cluster-operator:PR-2325-d401e0a9

@egegunes egegunes merged commit e741dca into main Dec 23, 2025
15 of 16 checks passed
@egegunes egegunes deleted the K8SPXC-1781 branch December 23, 2025 05:37
@egegunes egegunes added this to the v1.19.0 milestone Dec 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/L 100-499 lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants