Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

K8SPXC-1446: Release 1.16.0 #1921

Merged
merged 10 commits into from
Dec 19, 2024
2 changes: 1 addition & 1 deletion deploy/bundle.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11522,7 +11522,7 @@ spec:
value: percona-xtradb-cluster-operator
- name: DISABLE_TELEMETRY
value: "false"
image: perconalab/percona-xtradb-cluster-operator:main
image: percona/percona-xtradb-cluster-operator:1.16.0
imagePullPolicy: Always
livenessProbe:
failureThreshold: 3
Expand Down
6 changes: 3 additions & 3 deletions deploy/cr-minimal.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ spec:
enabled: false
pxc:
size: 1
image: perconalab/percona-xtradb-cluster-operator:main-pxc8.0
image: percona/percona-xtradb-cluster:8.0.39-30.1
volumeSpec:
persistentVolumeClaim:
resources:
Expand All @@ -25,7 +25,7 @@ spec:
haproxy:
enabled: true
size: 1
image: perconalab/percona-xtradb-cluster-operator:main-haproxy
image: percona/haproxy:2.8.11
logcollector:
enabled: true
image: perconalab/percona-xtradb-cluster-operator:main-logcollector
image: percona/percona-xtradb-cluster-operator:1.16.0-logcollector-fluentbit3.2.2
14 changes: 7 additions & 7 deletions deploy/cr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ spec:
# sslInternalSecretName: cluster1-ssl-internal
# logCollectorSecretName: cluster1-log-collector-secrets
# initContainer:
# image: perconalab/percona-xtradb-cluster-operator:main
# image: percona/percona-xtradb-cluster-operator:1.16.0
# containerSecurityContext:
# privileged: false
# runAsUser: 1001
Expand Down Expand Up @@ -58,7 +58,7 @@ spec:
schedule: "0 4 * * *"
pxc:
size: 3
image: perconalab/percona-xtradb-cluster-operator:main-pxc8.0
image: percona/percona-xtradb-cluster:8.0.39-30.1
autoRecovery: true
# expose:
# enabled: true
Expand Down Expand Up @@ -206,7 +206,7 @@ spec:
haproxy:
enabled: true
size: 3
image: perconalab/percona-xtradb-cluster-operator:main-haproxy
image: percona/haproxy:2.8.11
# imagePullPolicy: Always
# schedulerName: mycustom-scheduler
# readinessDelaySec: 15
Expand Down Expand Up @@ -381,7 +381,7 @@ spec:
proxysql:
enabled: false
size: 3
image: perconalab/percona-xtradb-cluster-operator:main-proxysql
image: percona/proxysql2:2.7.1
# imagePullPolicy: Always
# configuration: |
# datadir="/var/lib/proxysql"
Expand Down Expand Up @@ -543,7 +543,7 @@ spec:
# - 10.0.0.0/8
logcollector:
enabled: true
image: perconalab/percona-xtradb-cluster-operator:main-logcollector
image: percona/percona-xtradb-cluster-operator:1.16.0-logcollector-fluentbit3.2.2
# configuration: |
# [OUTPUT]
# Name es
Expand Down Expand Up @@ -576,7 +576,7 @@ spec:

pmm:
enabled: false
image: perconalab/pmm-client:dev-latest
image: percona/pmm-client:2.44.0
serverHost: monitoring-service
# serverUser: admin
# pxcParams: "--disable-tablestats-limit=2000"
Expand All @@ -589,7 +589,7 @@ spec:
cpu: 300m
backup:
# allowParallel: true
image: perconalab/percona-xtradb-cluster-operator:main-pxc8.0-backup
image: percona/percona-xtradb-cluster-operator:1.16.0-pxc8.0-backup-pxb8.0.35
# backoffLimit: 6
# activeDeadlineSeconds: 3600
# serviceAccountName: percona-xtradb-cluster-operator
Expand Down
2 changes: 1 addition & 1 deletion deploy/cw-bundle.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11532,7 +11532,7 @@ spec:
value: percona-xtradb-cluster-operator
- name: DISABLE_TELEMETRY
value: "false"
image: perconalab/percona-xtradb-cluster-operator:main
image: percona/percona-xtradb-cluster-operator:1.16.0
imagePullPolicy: Always
resources:
limits:
Expand Down
2 changes: 1 addition & 1 deletion deploy/cw-operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ spec:
value: percona-xtradb-cluster-operator
- name: DISABLE_TELEMETRY
value: "false"
image: perconalab/percona-xtradb-cluster-operator:main
image: percona/percona-xtradb-cluster-operator:1.16.0
imagePullPolicy: Always
resources:
limits:
Expand Down
2 changes: 1 addition & 1 deletion deploy/operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ spec:
value: percona-xtradb-cluster-operator
- name: DISABLE_TELEMETRY
value: "false"
image: perconalab/percona-xtradb-cluster-operator:main
image: percona/percona-xtradb-cluster-operator:1.16.0
imagePullPolicy: Always
livenessProbe:
failureThreshold: 3
Expand Down
4 changes: 4 additions & 0 deletions e2e-tests/custom-users/compare/user-five-57.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
GRANT USAGE ON *.* TO 'user-five'@'%'
GRANT SELECT, UPDATE, DELETE ON `db1`.* TO 'user-five'@'%'
GRANT SELECT, UPDATE, DELETE ON `db2`.* TO 'user-five'@'%'
GRANT SELECT, UPDATE, DELETE ON `db3`.* TO 'user-five'@'%'
4 changes: 4 additions & 0 deletions e2e-tests/custom-users/compare/user-four-2-57.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
GRANT USAGE ON *.* TO 'user-four'@'%'
GRANT SELECT, UPDATE ON `db1`.* TO 'user-four'@'%'
GRANT SELECT, UPDATE ON `db2`.* TO 'user-four'@'%'
GRANT SELECT, UPDATE ON `db3`.* TO 'user-four'@'%'
4 changes: 4 additions & 0 deletions e2e-tests/custom-users/compare/user-four-3-57.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
GRANT USAGE ON *.* TO 'user-four'@'%'
GRANT SELECT, UPDATE, DELETE ON `db1`.* TO 'user-four'@'%'
GRANT SELECT, UPDATE, DELETE ON `db2`.* TO 'user-four'@'%'
GRANT SELECT, UPDATE, DELETE ON `db3`.* TO 'user-four'@'%'
4 changes: 4 additions & 0 deletions e2e-tests/custom-users/compare/user-four-4-57.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
GRANT USAGE ON *.* TO 'user-four'@'%'
GRANT SELECT, INSERT, UPDATE, DELETE ON `db1`.* TO 'user-four'@'%'
GRANT SELECT, UPDATE, DELETE ON `db2`.* TO 'user-four'@'%'
GRANT SELECT, UPDATE, DELETE ON `db3`.* TO 'user-four'@'%'
3 changes: 3 additions & 0 deletions e2e-tests/custom-users/compare/user-four-57.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
GRANT USAGE ON *.* TO 'user-four'@'%'
GRANT SELECT, UPDATE ON `db1`.* TO 'user-four'@'%'
GRANT SELECT, UPDATE ON `db2`.* TO 'user-four'@'%'
5 changes: 5 additions & 0 deletions e2e-tests/custom-users/compare/user-one-2-57.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
GRANT USAGE ON *.* TO 'user-one'@'127.0.0.1'
GRANT SELECT, INSERT ON `db1`.* TO 'user-one'@'127.0.0.1'
GRANT SELECT, INSERT ON `db2`.* TO 'user-one'@'127.0.0.1'
GRANT SELECT, INSERT ON `db1`.* TO 'user-one'@'%'
GRANT SELECT, INSERT ON `db2`.* TO 'user-one'@'%'
3 changes: 3 additions & 0 deletions e2e-tests/custom-users/compare/user-one-57.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
GRANT USAGE ON *.* TO 'user-one'@'%'
GRANT SELECT, INSERT ON `db1`.* TO 'user-one'@'%'
GRANT SELECT, INSERT ON `db2`.* TO 'user-one'@'%'
1 change: 1 addition & 0 deletions e2e-tests/custom-users/compare/user-three-57.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
GRANT USAGE ON *.* TO 'user-three'@'%'
1 change: 1 addition & 0 deletions e2e-tests/custom-users/compare/user-two-57.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
GRANT INSERT, UPDATE ON *.* TO 'user-two'@'%'
8 changes: 4 additions & 4 deletions e2e-tests/custom-users/run
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ kubectl_bin patch pxc some-name --type=merge -p='{
"name":"user-four",
"dbs": ["db1", "db2"],
"grants":["SELECT, UPDATE"],
"hosts": ["%"]
"hosts": ["%"]
}
]}
}'
Expand All @@ -75,7 +75,7 @@ kubectl_bin patch pxc some-name --type=merge -p='{
"name":"user-four",
"dbs": ["db1", "db2", "db3"],
"grants":["SELECT, UPDATE"],
"hosts": ["%"]
"hosts": ["%"]
}
]}
}'
Expand All @@ -89,7 +89,7 @@ kubectl_bin patch pxc some-name --type=merge -p='{
"name":"user-four",
"dbs": ["db1", "db2", "db3"],
"grants":["SELECT, UPDATE, DELETE"],
"hosts": ["%"]
"hosts": ["%"]
}
]}
}'
Expand All @@ -115,7 +115,7 @@ kubectl_bin patch pxc some-name --type=merge -p='{
"name":"user-five",
"dbs": ["db1", "db2", "db3"],
"grants":["SELECT, UPDATE, DELETE"],
"hosts": ["%"]
"hosts": ["%"]
}
]}
}'
Expand Down
26 changes: 15 additions & 11 deletions e2e-tests/functions
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ SKIP_REMOTE_BACKUPS=${SKIP_REMOTE_BACKUPS:-1}
PMM_SERVER_VER=${PMM_SERVER_VER:-"9.9.9"}
IMAGE_PMM_CLIENT=${IMAGE_PMM_CLIENT:-"perconalab/pmm-client:dev-latest"}
IMAGE_PMM_SERVER=${IMAGE_PMM_SERVER:-"perconalab/pmm-server:dev-latest"}
CERT_MANAGER_VER="1.15.2"
CERT_MANAGER_VER="1.16.2"
tmp_dir=$(mktemp -d)
sed=$(which gsed || which sed)
date=$(which gdate || which date)
Expand Down Expand Up @@ -540,12 +540,14 @@ compare_mysql_cmd() {
local command="$2"
local uri="$3"
local postfix="$4"
local expected_result=${test_dir}/compare/${command_id}${postfix}.sql

if [[ $IMAGE_PXC =~ 8\.0 ]] && [ -f ${test_dir}/compare/${command_id}${postfix}-80.sql ]; then
expected_result=${test_dir}/compare/${command_id}${postfix}-80.sql
elif [[ $IMAGE_PXC =~ 8\.4 ]] && [ -f ${test_dir}/compare/${command_id}${postfix}-84.sql ]; then
expected_result=${test_dir}/compare/${command_id}${postfix}-84.sql
local expected_result=$test_dir/compare/$command_id$postfix.sql

if [[ $IMAGE_PXC =~ 8\.4 && -f $test_dir/compare/$command_id$postfix-84.sql ]]; then
expected_result=$test_dir/compare/$command_id$postfix-84.sql
elif [[ $IMAGE_PXC =~ 8\.0 && -f $test_dir/compare/$command_id$postfix-80.sql ]]; then
expected_result=$test_dir/compare/$command_id$postfix-80.sql
elif [[ $IMAGE_PXC =~ 5\.7 && -f $test_dir/compare/$command_id$postfix-57.sql ]]; then
expected_result=$test_dir/compare/$command_id$postfix-57.sql
fi

run_mysql "$command" "$uri" \
Expand Down Expand Up @@ -612,10 +614,12 @@ compare_mysql_user() {
local user=$(echo $uri | sed -e 's/.*-u//; s/ .*//')
local expected_result=${test_dir}/compare/$user$postfix.sql

if [[ $IMAGE_PXC =~ 8\.0 ]] && [ -f ${test_dir}/compare/$user$postfix-80.sql ]; then
expected_result=${test_dir}/compare/$user$postfix-80.sql
elif [[ $IMAGE_PXC =~ 8\.4 ]] && [ -f ${test_dir}/compare/$user$postfix-84.sql ]; then
expected_result=${test_dir}/compare/$user$postfix-84.sql
if [[ $IMAGE_PXC =~ 8\.4 && -f $test_dir/compare/$user$postfix-84.sql ]]; then
expected_result=$test_dir/compare/$user$postfix-84.sql
elif [[ $IMAGE_PXC =~ 8\.0 && -f $test_dir/compare/$user$postfix-80.sql ]]; then
expected_result=$test_dir/compare/$user$postfix-80.sql
elif [[ $IMAGE_PXC =~ 5\.7 && -f $test_dir/compare/$user$postfix-57.sql ]]; then
expected_result=$test_dir/compare/$user$postfix-57.sql
fi

(run_mysql "SHOW GRANTS;" "$uri" || :) \
Expand Down
2 changes: 1 addition & 1 deletion e2e-tests/init-deploy/run
Copy link
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 🐶

desc 'check if mysql-state-monitor works as expected'
for pod in $(kubectl_bin get pod -l app.kubernetes.io/component=pxc --no-headers | awk '{print $1}'); do
state=$(kubectl_bin exec ${pod} -- cat /var/lib/mysql/mysql.state)
if [[ ${state} != 'ready' ]]; then
echo "/var/lib/mysql/mysql.state says ${state}, it should be ready"
exit 1
fi
done

Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ compare_kubectl service/$cluster-pxc
compare_kubectl service/$cluster-proxysql
compare_kubectl service/$cluster-proxysql-unready

if [[ ${MYSQL_VERSION} == '8.0' ]]; then
if [[ ! $IMAGE_PXC =~ 5\.7 ]]; then
desc 'check if mysql-state-monitor works as expected'
for pod in $(kubectl_bin get pod -l app.kubernetes.io/component=pxc --no-headers | awk '{print $1}'); do
state=$(kubectl_bin exec ${pod} -- cat /var/lib/mysql/mysql.state)
Expand Down
27 changes: 15 additions & 12 deletions e2e-tests/release_versions
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
# Images versions
IMAGE_OPERATOR=perconalab/percona-xtradb-cluster-operator:main
IMAGE_OPERATOR=percona/percona-xtradb-cluster-operator:1.16.0

IMAGE_PXC80=perconalab/percona-xtradb-cluster-operator:main-pxc8.0
IMAGE_BACKUP80=perconalab/percona-xtradb-cluster-operator:main-pxc8.0-backup
IMAGE_PXC84=percona/percona-xtradb-cluster:8.4.2-2.1
IMAGE_BACKUP84=percona/percona-xtradb-cluster-operator:1.16.0-pxc8.4-backup-pxb8.4.0

IMAGE_PXC57=perconalab/percona-xtradb-cluster-operator:main-pxc5.7
IMAGE_BACKUP57=perconalab/percona-xtradb-cluster-operator:main-pxc5.7-backup
IMAGE_PXC80=percona/percona-xtradb-cluster:8.0.39-30.1
IMAGE_BACKUP80=percona/percona-xtradb-cluster-operator:1.16.0-pxc8.0-backup-pxb8.0.35

IMAGE_PROXY=perconalab/percona-xtradb-cluster-operator:main-proxysql
IMAGE_HAPROXY=perconalab/percona-xtradb-cluster-operator:main-haproxy
IMAGE_LOGCOLLECTOR=perconalab/percona-xtradb-cluster-operator:main-logcollector
IMAGE_PMM_CLIENT=perconalab/pmm-client:dev-latest
IMAGE_PMM_SERVER=perconalab/pmm-server:dev-latest
IMAGE_PXC57=percona/percona-xtradb-cluster:5.7.44-31.65
IMAGE_BACKUP57=percona/percona-xtradb-cluster-operator:1.16.0-pxc5.7-backup-pxb2.4.29

IMAGE_PROXY=percona/proxysql2:2.7.1
IMAGE_HAPROXY=percona/haproxy:2.8.11
IMAGE_LOGCOLLECTOR=percona/percona-xtradb-cluster-operator:1.16.0-logcollector-fluentbit3.2.2
IMAGE_PMM_CLIENT=percona/pmm-client:2.44.0
IMAGE_PMM_SERVER=percona/pmm-server:2.44.0

# Supported k8s versions
GKE_MIN=1.28
Expand All @@ -20,6 +23,6 @@ EKS_MIN=1.28
EKS_MAX=1.31
AKS_MIN=1.28
AKS_MAX=1.31
OPENSHIFT_MIN=4.13.52
OPENSHIFT_MAX=4.17.3
OPENSHIFT_MIN=4.14.42
OPENSHIFT_MAX=4.17.8
MINIKUBE_REL=1.31.0
Loading