Skip to content

Add support of the official MySQL Docker image - #1198

Draft
hors wants to merge 10 commits into
mainfrom
support-oracle-mysql
Draft

Add support of the official MySQL Docker image#1198
hors wants to merge 10 commits into
mainfrom
support-oracle-mysql

Conversation

@hors

@hors hors commented Feb 11, 2026

Copy link
Copy Markdown
Collaborator

Due to the high volume of requests, we're unable to provide free service for this account. To continue using the service, please upgarde to a paid plan.

CHANGEDESCRIPTION

Problem:
Short explanation of the problem.

Cause:
Short explanation of the root cause of the issue if applicable.

Solution:
Short explanation of the solution we are providing with this PR.

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?

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 PS version?
  • Does the change support oldest and newest supported Kubernetes version?

@pull-request-size pull-request-size Bot added the size/M 30-99 lines label Feb 11, 2026
@hors
hors force-pushed the support-oracle-mysql branch from de665c8 to 8b3d095 Compare February 11, 2026 12:38
@hors hors changed the title Add support for the official MySQL Docker image Add support of the official MySQL Docker image Feb 13, 2026
Comment thread pkg/mysql/mysql.go

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[gofmt] reported by reviewdog 🐶

AppName = "mysql"
DataVolumeName = "datadir"
DataMountPath = "/var/lib/mysql"
CustomConfigKey = "my.cnf"
configVolumeName = "config"
configMountPath = "/etc/mysql/config"
nodeCnfVolumeName = "node-cnf"
nodeCnfMountPath = "/etc/my.cnf.d"
nodeCnfConfDVolumeName = "node-cnf-conf-d" // Oracle MySQL image uses !includedir /etc/mysql/conf.d/
nodeCnfConfDMountPath = "/etc/mysql/conf.d"
CustomMyCnfPath = "/etc/mysql/config/my-config.cnf"
credsVolumeName = "users"
mysqlshVolumeName = "mysqlsh"
mysqlshMountPath = "/.mysqlsh"
tlsVolumeName = "tls"
tlsMountPath = "/etc/mysql/mysql-tls-secret"
BackupLogDir = "/var/log/xtrabackup"
vaultSecretVolumeName = "vault-keyring-secret"
vaultSecretMountPath = "/etc/mysql/vault-keyring-secret"

@pull-request-size pull-request-size Bot added size/L 100-499 lines and removed size/M 30-99 lines labels May 4, 2026
@hors
hors force-pushed the support-oracle-mysql branch from a31c5ec to 4abb190 Compare May 4, 2026 17:12
Comment thread e2e-tests/functions
--selector=name=mysql-client \
-o 'jsonpath={.items[*].metadata.name}' 2>/dev/null) || true
pod="${pod%% *}"
if [[ -n "$pod" ]]; then

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[shfmt] reported by reviewdog 🐶

Suggested change
if [[ -n "$pod" ]]; then
if [[ -n $pod ]]; then

@pull-request-size pull-request-size Bot added size/XL 500-999 lines and removed size/L 100-499 lines labels May 5, 2026
Comment thread e2e-tests/functions
bash -c "printf '%s\n' \"${command}\" | mysql -sN $host $user" 2>&1 \
local target_pod="${pod:-mysql-client}"
local container_opt=()
if [[ "${target_pod}" != "mysql-client" ]]; then

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[shfmt] reported by reviewdog 🐶

Suggested change
if [[ "${target_pod}" != "mysql-client" ]]; then
if [[ ${target_pod} != "mysql-client" ]]; then

Comment thread e2e-tests/functions
# does not match mysqld (e.g. /var/run/mysqld/mysqld.sock vs /var/lib/mysql/mysql.sock).
# Operator + ps-entrypoint always use ${DataMountPath}/mysql.sock (see pkg/mysql DataMountPath).
local conn_args="${host}"
if [[ "${target_pod}" != "mysql-client" && "${host}" == *"localhost"* ]]; then

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[shfmt] reported by reviewdog 🐶

Suggested change
if [[ "${target_pod}" != "mysql-client" && "${host}" == *"localhost"* ]]; then
if [[ ${target_pod} != "mysql-client" && ${host} == *"localhost"* ]]; then

Comment thread e2e-tests/functions
socket=$(kubectl -n "${NAMESPACE}" exec "${target_pod}" "${container_opt[@]}" -- \
env MYSQL_PWD="${root_pw}" mysql -sN -uroot --socket="${operator_sock}" -e "SELECT @@socket" 2>/dev/null | tail -1)
socket=$(echo "${socket}" | tr -d '\r' | tr -d '[:space:]')
if [[ -z "${socket}" ]]; then

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[shfmt] reported by reviewdog 🐶

Suggested change
if [[ -z "${socket}" ]]; then
if [[ -z ${socket} ]]; then

Comment thread e2e-tests/functions
local sql_mode="--sql"

# Port 33060 is MySQL X Protocol; --sql uses classic protocol and fails on 8.4+ (ERROR 2007).
if [[ "$host" =~ -P[[:space:]]*33060 ]] || [[ "$host" =~ :33060 ]]; then

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[shfmt] reported by reviewdog 🐶

Suggested change
if [[ "$host" =~ -P[[:space:]]*33060 ]] || [[ "$host" =~ :33060 ]]; then
if [[ $host =~ -P[[:space:]]*33060 ]] || [[ $host =~ :33060 ]]; then

@JNKPercona

Copy link
Copy Markdown
Collaborator
Test Name Result Time
async-ignore-annotations-8-4 passed 00:00:00
async-global-metadata-8-4 passed 00:00:00
async-upgrade-8-0 failure 00:00:00
async-upgrade-8-4 failure 00:00:00
auto-config-8-4 passed 00:00:00
config-8-4 passed 00:00:00
config-router-8-0 passed 00:00:00
config-router-8-4 passed 00:00:00
demand-backup-8-0 passed 00:00:00
demand-backup-8-4 passed 00:00:00
gr-pitr-minio-8-4 passed 00:00:00
gr-pitr-one-pod-8-4 passed 00:00:00
async-pitr-minio-8-4 passed 00:00:00
demand-backup-cloud-8-4 passed 00:00:00
demand-backup-retry-8-4 passed 00:00:00
demand-backup-incremental-8-0 passed 00:00:00
demand-backup-incremental-8-4 passed 00:00:00
async-data-at-rest-encryption-8-0 failure 00:00:00
async-data-at-rest-encryption-8-4 failure 00:00:00
gr-global-metadata-8-4 passed 00:00:00
gr-data-at-rest-encryption-8-0 failure 00:00:00
gr-data-at-rest-encryption-8-4 failure 00:00:00
gr-demand-backup-8-4 passed 00:00:00
gr-demand-backup-cloud-8-4 passed 00:00:00
gr-demand-backup-haproxy-8-4 passed 00:00:00
gr-demand-backup-incremental-8-0 passed 00:00:00
gr-demand-backup-incremental-8-4 passed 00:00:00
gr-finalizer-8-4 passed 00:00:00
gr-haproxy-8-0 passed 00:00:00
gr-haproxy-8-4 passed 00:00:00
gr-ignore-annotations-8-4 passed 00:00:00
gr-init-deploy-8-0 passed 00:00:00
gr-init-deploy-8-4 passed 00:00:00
gr-one-pod-8-4 passed 00:00:00
gr-recreate-8-4 passed 00:00:00
gr-scaling-8-4 failure 00:00:00
gr-scheduled-backup-8-4 passed 00:00:00
gr-scheduled-backup-incremental-8-4 passed 00:00:00
gr-security-context-8-4 passed 00:00:00
gr-self-healing-8-4 passed 00:00:00
gr-tls-cert-manager-8-4 passed 00:00:00
gr-users-8-4 passed 00:00:00
gr-upgrade-8-0 failure 00:00:00
gr-upgrade-8-4 failure 00:00:00
haproxy-8-0 passed 00:00:00
haproxy-8-4 passed 00:00:00
init-deploy-8-0 passed 00:00:00
init-deploy-8-4 passed 00:00:00
limits-8-4 passed 00:00:00
monitoring-8-4 passed 00:00:00
one-pod-8-0 passed 00:00:00
one-pod-8-4 passed 00:00:00
operator-self-healing-8-4 passed 00:00:00
pvc-resize-8-4 passed 00:00:00
recreate-8-4 passed 00:00:00
scaling-8-4 passed 00:00:00
scheduled-backup-8-0 passed 00:00:00
scheduled-backup-8-4 passed 00:00:00
scheduled-backup-incremental-8-0 passed 00:00:00
scheduled-backup-incremental-8-4 passed 00:00:00
service-per-pod-8-4 passed 00:00:00
sidecars-8-4 passed 00:00:00
smart-update-8-4 passed 00:00:00
storage-8-4 passed 00:00:00
telemetry-8-4 passed 00:00:00
tls-cert-manager-8-4 passed 00:00:00
users-8-0 passed 00:00:00
users-8-4 passed 00:00:00
version-service-8-4 passed 00:00:00
Summary Value
Tests Run 69/69
Job Duration 00:18:13
Total Test Time N/A

commit: f0c6e8f
image: perconalab/percona-server-mysql-operator:PR-1198-f0c6e8f9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/XL 500-999 lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants