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-1410 add PXC 8.4.X support #1878

Merged
merged 9 commits into from
Dec 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build/pxc-configure-pxc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,15 @@
NODE_PORT=3306

while read -ra LINE; do
echo "read line $LINE"

Check warning on line 50 in build/pxc-configure-pxc.sh

View workflow job for this annotation

GitHub Actions / shellcheck

[shellcheck] build/pxc-configure-pxc.sh#L50 <ShellCheck.SC2128>

Expanding an array without an index only gives the first element.
Raw output
./build/pxc-configure-pxc.sh:50:18: warning: Expanding an array without an index only gives the first element. (ShellCheck.SC2128)
LINE_IP=$(getent hosts "$LINE" | awk '{ print $1 }')

Check warning on line 51 in build/pxc-configure-pxc.sh

View workflow job for this annotation

GitHub Actions / shellcheck

[shellcheck] build/pxc-configure-pxc.sh#L51 <ShellCheck.SC2128>

Expanding an array without an index only gives the first element.
Raw output
./build/pxc-configure-pxc.sh:51:26: warning: Expanding an array without an index only gives the first element. (ShellCheck.SC2128)
if [ "$LINE_IP" != "$NODE_IP" ]; then
LINE_HOST=$(mysql_root_exec "$LINE_IP" 'select @@hostname' || :)
if [ -n "$LINE_HOST" ]; then
PEERS=("${PEERS[@]}" $LINE_HOST)

Check warning on line 55 in build/pxc-configure-pxc.sh

View workflow job for this annotation

GitHub Actions / shellcheck

[shellcheck] build/pxc-configure-pxc.sh#L55 <ShellCheck.SC2206>

Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a.
Raw output
./build/pxc-configure-pxc.sh:55:25: warning: Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a. (ShellCheck.SC2206)
PEERS_FULL=("${PEERS_FULL[@]}" "$LINE_HOST.$CLUSTER_NAME")
else
PEERS_FULL=("${PEERS_FULL[@]}" $LINE_IP)

Check warning on line 58 in build/pxc-configure-pxc.sh

View workflow job for this annotation

GitHub Actions / shellcheck

[shellcheck] build/pxc-configure-pxc.sh#L58 <ShellCheck.SC2206>

Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a.
Raw output
./build/pxc-configure-pxc.sh:58:35: warning: Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a. (ShellCheck.SC2206)
fi
fi
done
Expand All @@ -69,7 +69,7 @@

CFG=/etc/mysql/node.cnf
MYSQL_VERSION=$(mysqld -V | awk '{print $3}' | awk -F'.' '{print $1"."$2}')
if [ "$MYSQL_VERSION" == '8.0' ]; then
if [[ "$MYSQL_VERSION" =~ ^(8\.0|8\.4)$ ]]; then
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 🐶

Suggested change
if [[ "$MYSQL_VERSION" =~ ^(8\.0|8\.4)$ ]]; then
if [[ $MYSQL_VERSION =~ ^(8\.0|8\.4)$ ]]; then

grep -E -q "^[#]?admin-address" "$CFG" || sed '/^\[mysqld\]/a admin-address=\n' ${CFG} 1<>${CFG}
grep -E -q "^[#]?log_error_suppression_list" "$CFG" || sed '/^\[mysqld\]/a log_error_suppression_list="MY-010055"\n' ${CFG} 1<>${CFG}
else
Expand Down Expand Up @@ -113,12 +113,12 @@

KEY=${SSL_DIR}/tls.key
CERT=${SSL_DIR}/tls.crt
if [ -f "${SSL_INTERNAL_DIR}"/tls.key -a -f "${SSL_INTERNAL_DIR}"/tls.crt ]; then

Check warning on line 116 in build/pxc-configure-pxc.sh

View workflow job for this annotation

GitHub Actions / shellcheck

[shellcheck] build/pxc-configure-pxc.sh#L116 <ShellCheck.SC2166>

Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
Raw output
./build/pxc-configure-pxc.sh:116:39: warning: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. (ShellCheck.SC2166)
KEY=${SSL_INTERNAL_DIR}/tls.key
CERT=${SSL_INTERNAL_DIR}/tls.crt
fi

if [ -f "$CA" -a -f "$KEY" -a -f "$CERT" ]; then

Check warning on line 121 in build/pxc-configure-pxc.sh

View workflow job for this annotation

GitHub Actions / shellcheck

[shellcheck] build/pxc-configure-pxc.sh#L121 <ShellCheck.SC2166>

Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
Raw output
./build/pxc-configure-pxc.sh:121:15: warning: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. (ShellCheck.SC2166)

Check warning on line 121 in build/pxc-configure-pxc.sh

View workflow job for this annotation

GitHub Actions / shellcheck

[shellcheck] build/pxc-configure-pxc.sh#L121 <ShellCheck.SC2166>

Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
Raw output
./build/pxc-configure-pxc.sh:121:28: warning: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. (ShellCheck.SC2166)
sed "/^\[mysqld\]/a pxc-encrypt-cluster-traffic=ON\nssl-ca=$CA\nssl-key=$KEY\nssl-cert=$CERT" ${CFG} 1<>${CFG}
else
sed "/^\[mysqld\]/a pxc-encrypt-cluster-traffic=OFF" ${CFG} 1<>${CFG}
Expand Down
30 changes: 16 additions & 14 deletions build/pxc-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
elif [ "${!fileVar:-}" ]; then
val="$(<"${!fileVar}")"
elif [ "${3:-}" ] && [ -f "/etc/mysql/mysql-users-secret/$3" ]; then
val="$(</etc/mysql/mysql-users-secret/$3)"

Check notice on line 44 in build/pxc-entrypoint.sh

View workflow job for this annotation

GitHub Actions / shellcheck

[shellcheck] build/pxc-entrypoint.sh#L44 <ShellCheck.SC2086>

Double quote to prevent globbing and word splitting.
Raw output
./build/pxc-entrypoint.sh:44:41: info: Double quote to prevent globbing and word splitting. (ShellCheck.SC2086)
fi
export "$var"="$val"
unset "$fileVar"
Expand All @@ -60,7 +60,7 @@
case "$f" in
*.sh)
echo "$0: running $f"
. "$f"

Check warning on line 63 in build/pxc-entrypoint.sh

View workflow job for this annotation

GitHub Actions / shellcheck

[shellcheck] build/pxc-entrypoint.sh#L63 <ShellCheck.SC1090>

ShellCheck can't follow non-constant source. Use a directive to specify location.
Raw output
./build/pxc-entrypoint.sh:63:5: warning: ShellCheck can't follow non-constant source. Use a directive to specify location. (ShellCheck.SC1090)
;;
*.sql)
echo "$0: running $f"
Expand Down Expand Up @@ -165,7 +165,7 @@
sed -i "/\[mysqld\]/a early-plugin-load=keyring_vault.so" $CFG
sed -i "/\[mysqld\]/a keyring_vault_config=$vault_secret" $CFG

if [ "$MYSQL_VERSION" == '8.0' ]; then
if [[ "$MYSQL_VERSION" =~ ^(8\.0|8\.4)$ ]]; then
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 🐶

Suggested change
if [[ "$MYSQL_VERSION" =~ ^(8\.0|8\.4)$ ]]; then
if [[ $MYSQL_VERSION =~ ^(8\.0|8\.4)$ ]]; then

sed -i "/\[mysqld\]/a default_table_encryption=ON" $CFG
sed -i "/\[mysqld\]/a table_encryption_privilege_check=ON" $CFG
sed -i "/\[mysqld\]/a innodb_undo_log_encrypt=ON" $CFG
Expand All @@ -189,12 +189,11 @@
grep -q "^progress=" $CFG && sed -i "s|^progress=.*|progress=1|" $CFG
grep -q "^\[sst\]" "$CFG" || printf '[sst]\n' >>"$CFG"
grep -q "^cpat=" "$CFG" || sed '/^\[sst\]/a cpat=.*\\.pem$\\|.*init\\.ok$\\|.*galera\\.cache$\\|.*wsrep_recovery_verbose\\.log$\\|.*readiness-check\\.sh$\\|.*liveness-check\\.sh$\\|.*get-pxc-state$\\|.*sst_in_progress$\\|.*sleep-forever$\\|.*pmm-prerun\\.sh$\\|.*sst-xb-tmpdir$\\|.*\\.sst$\\|.*gvwstate\\.dat$\\|.*grastate\\.dat$\\|.*\\.err$\\|.*\\.log$\\|.*RPM_UPGRADE_MARKER$\\|.*RPM_UPGRADE_HISTORY$\\|.*pxc-entrypoint\\.sh$\\|.*unsafe-bootstrap\\.sh$\\|.*pxc-configure-pxc\\.sh\\|.*peer-list$\\|.*auth_plugin$\\|.*version_info$\\|.*mysql-state-monitor$\\|.*mysql-state-monitor\\.log$\\|.*notify\\.sock$\\|.*mysql\\.state$' "$CFG" 1<>"$CFG"
if [[ $MYSQL_VERSION == '8.0' ]]; then
if [[ $MYSQL_PATCH_VERSION -ge 26 ]]; then
grep -q "^skip_replica_start=ON" "$CFG" || sed -i "/\[mysqld\]/a skip_replica_start=ON" $CFG
else
grep -q "^skip_slave_start=ON" "$CFG" || sed -i "/\[mysqld\]/a skip_slave_start=ON" $CFG
fi

if [[ $MYSQL_VERSION == '8.0' && $MYSQL_PATCH_VERSION -ge 26 ]] || [[ $MYSQL_VERSION == '8.4' ]]; then
grep -q "^skip_replica_start=ON" "$CFG" || sed -i "/\[mysqld\]/a skip_replica_start=ON" $CFG
else
grep -q "^skip_slave_start=ON" "$CFG" || sed -i "/\[mysqld\]/a skip_slave_start=ON" $CFG
fi

auth_plugin=${DEFAULT_AUTHENTICATION_PLUGIN}
Expand All @@ -220,7 +219,7 @@
echo "${auth_plugin}" >/var/lib/mysql/auth_plugin

sed -i "/default_authentication_plugin/d" $CFG
if [[ $MYSQL_VERSION == '8.0' && $MYSQL_PATCH_VERSION -ge 27 ]]; then
if [[ $MYSQL_VERSION == '8.0' && $MYSQL_PATCH_VERSION -ge 27 ]] || [[ $MYSQL_VERSION == "8.4" ]]; then
sed -i "/\[mysqld\]/a authentication_policy=${auth_plugin},," $CFG
else
sed -i "/\[mysqld\]/a default_authentication_plugin=${auth_plugin}" $CFG
Expand Down Expand Up @@ -249,7 +248,7 @@
i=$(curl "$DISCOVERY_SERVICE/v2/keys/pxc-cluster/queue/$CLUSTER_NAME" | jq -r '.node.nodes[].value')

# this remove my ip from the list
i1="${i[@]//$NODE_IP/}"

Check warning on line 251 in build/pxc-entrypoint.sh

View workflow job for this annotation

GitHub Actions / shellcheck

[shellcheck] build/pxc-entrypoint.sh#L251 <ShellCheck.SC2124>

Assigning an array to a string! Assign as array, or use * instead of @ to concatenate.
Raw output
./build/pxc-entrypoint.sh:251:5: warning: Assigning an array to a string! Assign as array, or use * instead of @ to concatenate. (ShellCheck.SC2124)

# Register the current IP in the discovery service
# key set to expire in 30 sec. There is a cronjob that should update them regularly
Expand All @@ -259,8 +258,8 @@

i=$(curl "$DISCOVERY_SERVICE/v2/keys/pxc-cluster/$CLUSTER_NAME/?quorum=true" | jq -r '.node.nodes[]?.key' | awk -F'/' '{print $(NF)}')
# this remove my ip from the list
i2="${i[@]//$NODE_IP/}"

Check warning on line 261 in build/pxc-entrypoint.sh

View workflow job for this annotation

GitHub Actions / shellcheck

[shellcheck] build/pxc-entrypoint.sh#L261 <ShellCheck.SC2124>

Assigning an array to a string! Assign as array, or use * instead of @ to concatenate.
Raw output
./build/pxc-entrypoint.sh:261:5: warning: Assigning an array to a string! Assign as array, or use * instead of @ to concatenate. (ShellCheck.SC2124)
CLUSTER_JOIN=$(join , $i1 $i2)

Check notice on line 262 in build/pxc-entrypoint.sh

View workflow job for this annotation

GitHub Actions / shellcheck

[shellcheck] build/pxc-entrypoint.sh#L262 <ShellCheck.SC2086>

Double quote to prevent globbing and word splitting.
Raw output
./build/pxc-entrypoint.sh:262:24: info: Double quote to prevent globbing and word splitting. (ShellCheck.SC2086)

Check notice on line 262 in build/pxc-entrypoint.sh

View workflow job for this annotation

GitHub Actions / shellcheck

[shellcheck] build/pxc-entrypoint.sh#L262 <ShellCheck.SC2086>

Double quote to prevent globbing and word splitting.
Raw output
./build/pxc-entrypoint.sh:262:28: info: Double quote to prevent globbing and word splitting. (ShellCheck.SC2086)

sed -r "s|^[#]?wsrep_node_address=.*$|wsrep_node_address=${NODE_IP}|" "${CFG}" 1<>"${CFG}"
sed -r "s|^[#]?wsrep_cluster_name=.*$|wsrep_cluster_name=${CLUSTER_NAME}|" "${CFG}" 1<>"${CFG}"
Expand Down Expand Up @@ -293,14 +292,13 @@
echo "Cluster name is invalid, please check DNS"
exit 1
fi

if [[ -n ${NOTIFY_SOCKET} && ${MYSQL_VERSION} == '8.0' ]]; then
if [[ -n ${NOTIFY_SOCKET} && ${MYSQL_VERSION} =~ ^(8\.0|8\.4)$ ]]; then
nohup /var/lib/mysql/mysql-state-monitor >/var/lib/mysql/mysql-state-monitor.log 2>&1 < /dev/null &
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 🐶

Suggested change
nohup /var/lib/mysql/mysql-state-monitor >/var/lib/mysql/mysql-state-monitor.log 2>&1 < /dev/null &
nohup /var/lib/mysql/mysql-state-monitor >/var/lib/mysql/mysql-state-monitor.log 2>&1 </dev/null &

fi

# if we have CLUSTER_JOIN - then we do not need to perform datadir initialize
# the data will be copied from another node
if [ -z "$CLUSTER_JOIN" ] && [ "$1" = 'mysqld' -a -z "$wantHelp" ]; then

Check warning on line 301 in build/pxc-entrypoint.sh

View workflow job for this annotation

GitHub Actions / shellcheck

[shellcheck] build/pxc-entrypoint.sh#L301 <ShellCheck.SC2166>

Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
Raw output
./build/pxc-entrypoint.sh:301:48: warning: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. (ShellCheck.SC2166)
# still need to check config, container may have started with --user
_check_config "$@"

Expand All @@ -313,7 +311,7 @@
if [ ! -d "$DATADIR/mysql" ]; then
file_env 'MYSQL_ROOT_PASSWORD' '' 'root'
{ set +x; } 2>/dev/null
if [ -z "$MYSQL_ROOT_PASSWORD" -a -z "$MYSQL_ALLOW_EMPTY_PASSWORD" -a -z "$MYSQL_RANDOM_ROOT_PASSWORD" ]; then

Check warning on line 314 in build/pxc-entrypoint.sh

View workflow job for this annotation

GitHub Actions / shellcheck

[shellcheck] build/pxc-entrypoint.sh#L314 <ShellCheck.SC2166>

Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
Raw output
./build/pxc-entrypoint.sh:314:34: warning: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. (ShellCheck.SC2166)

Check warning on line 314 in build/pxc-entrypoint.sh

View workflow job for this annotation

GitHub Actions / shellcheck

[shellcheck] build/pxc-entrypoint.sh#L314 <ShellCheck.SC2166>

Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
Raw output
./build/pxc-entrypoint.sh:314:70: warning: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. (ShellCheck.SC2166)
echo >&2 'error: database is uninitialized and password option is not specified '
echo >&2 ' You need to specify one of MYSQL_ROOT_PASSWORD, MYSQL_ALLOW_EMPTY_PASSWORD and MYSQL_RANDOM_ROOT_PASSWORD'
exit 1
Expand All @@ -327,7 +325,11 @@
echo 'Initializing database'
# we initialize database into $TMPDIR because "--initialize-insecure" option does not work if directory is not empty
# in some cases storage driver creates unremovable artifacts (see K8SPXC-286), so $DATADIR cleanup is not possible
"$@" --initialize-insecure --skip-ssl --datadir="$TMPDIR"
if [[ $MYSQL_VERSION == "8.4" ]]; then
"$@" --initialize-insecure --datadir="$TMPDIR"
else
"$@" --initialize-insecure --skip-ssl --datadir="$TMPDIR"
fi
mv "$TMPDIR"/* "$DATADIR/"
rm -rfv "$TMPDIR"
echo 'Database initialized'
Expand Down Expand Up @@ -365,7 +367,7 @@
fi

{ set +x; } 2>/dev/null
if [ ! -z "$MYSQL_RANDOM_ROOT_PASSWORD" ]; then

Check notice on line 370 in build/pxc-entrypoint.sh

View workflow job for this annotation

GitHub Actions / shellcheck

[shellcheck] build/pxc-entrypoint.sh#L370 <ShellCheck.SC2236>

Use -n instead of ! -z.
Raw output
./build/pxc-entrypoint.sh:370:8: info: Use -n instead of ! -z. (ShellCheck.SC2236)
MYSQL_ROOT_PASSWORD="$(pwmake 128)"
echo "GENERATED ROOT PASSWORD: $MYSQL_ROOT_PASSWORD"
fi
Expand All @@ -373,7 +375,7 @@
rootCreate=
# default root to listen for connections from anywhere
file_env 'MYSQL_ROOT_HOST' '%'
if [ ! -z "$MYSQL_ROOT_HOST" -a "$MYSQL_ROOT_HOST" != 'localhost' ]; then

Check notice on line 378 in build/pxc-entrypoint.sh

View workflow job for this annotation

GitHub Actions / shellcheck

[shellcheck] build/pxc-entrypoint.sh#L378 <ShellCheck.SC2236>

Use -n instead of ! -z.
Raw output
./build/pxc-entrypoint.sh:378:8: info: Use -n instead of ! -z. (ShellCheck.SC2236)

Check warning on line 378 in build/pxc-entrypoint.sh

View workflow job for this annotation

GitHub Actions / shellcheck

[shellcheck] build/pxc-entrypoint.sh#L378 <ShellCheck.SC2166>

Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
Raw output
./build/pxc-entrypoint.sh:378:32: warning: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. (ShellCheck.SC2166)
# no, we don't care if read finds a terminating character in this heredoc
# https://unix.stackexchange.com/questions/265149/why-is-set-o-errexit-breaking-this-read-heredoc-expression/265151#265151
read -r -d '' rootCreate <<-EOSQL || true
Expand All @@ -385,15 +387,15 @@
file_env 'MONITOR_HOST' 'localhost'
file_env 'MONITOR_PASSWORD' 'monitor' 'monitor'
file_env 'REPLICATION_PASSWORD' 'replication' 'replication'
if [ "$MYSQL_VERSION" == '8.0' ]; then
if [[ "$MYSQL_VERSION" =~ ^(8\.0|8\.4)$ ]]; then
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 🐶

Suggested change
if [[ "$MYSQL_VERSION" =~ ^(8\.0|8\.4)$ ]]; then
if [[ $MYSQL_VERSION =~ ^(8\.0|8\.4)$ ]]; then

read -r -d '' monitorConnectGrant <<-EOSQL || true
GRANT SERVICE_CONNECTION_ADMIN ON *.* TO 'monitor'@'${MONITOR_HOST}';
EOSQL
fi

# SYSTEM_USER since 8.0.16
# https://dev.mysql.com/doc/refman/8.0/en/privileges-provided.html#priv_system-user
if [[ $MYSQL_VERSION == "8.0" ]] && ((MYSQL_PATCH_VERSION >= 16)); then
if [[ $MYSQL_VERSION == "8.0" ]] && ((MYSQL_PATCH_VERSION >= 16)) || [[ $MYSQL_VERSION == "8.4" ]]; then
read -r -d '' systemUserGrant <<-EOSQL || true
GRANT SYSTEM_USER ON *.* TO 'monitor'@'${MONITOR_HOST}';
EOSQL
Expand Down Expand Up @@ -430,7 +432,7 @@
EOSQL

{ set +x; } 2>/dev/null
if [ ! -z "$MYSQL_ROOT_PASSWORD" ]; then

Check notice on line 435 in build/pxc-entrypoint.sh

View workflow job for this annotation

GitHub Actions / shellcheck

[shellcheck] build/pxc-entrypoint.sh#L435 <ShellCheck.SC2236>

Use -n instead of ! -z.
Raw output
./build/pxc-entrypoint.sh:435:8: info: Use -n instead of ! -z. (ShellCheck.SC2236)
mysql+=(-p"${MYSQL_ROOT_PASSWORD}")
fi
set -x
Expand All @@ -444,7 +446,7 @@
file_env 'MYSQL_USER'
file_env 'MYSQL_PASSWORD'
{ set +x; } 2>/dev/null
if [ "$MYSQL_USER" -a "$MYSQL_PASSWORD" ]; then

Check warning on line 449 in build/pxc-entrypoint.sh

View workflow job for this annotation

GitHub Actions / shellcheck

[shellcheck] build/pxc-entrypoint.sh#L449 <ShellCheck.SC2166>

Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
Raw output
./build/pxc-entrypoint.sh:449:22: warning: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. (ShellCheck.SC2166)
echo "CREATE USER '$MYSQL_USER'@'%' IDENTIFIED BY '$MYSQL_PASSWORD' ;" | "${mysql[@]}"

if [ "$MYSQL_DATABASE" ]; then
Expand All @@ -462,7 +464,7 @@
done

{ set +x; } 2>/dev/null
if [ ! -z "$MYSQL_ONETIME_PASSWORD" ]; then

Check notice on line 467 in build/pxc-entrypoint.sh

View workflow job for this annotation

GitHub Actions / shellcheck

[shellcheck] build/pxc-entrypoint.sh#L467 <ShellCheck.SC2236>

Use -n instead of ! -z.
Raw output
./build/pxc-entrypoint.sh:467:8: info: Use -n instead of ! -z. (ShellCheck.SC2236)
"${mysql[@]}" <<-EOSQL
ALTER USER 'root'@'%' PASSWORD EXPIRE;
EOSQL
Expand All @@ -479,13 +481,13 @@
fi

# exit when MYSQL_INIT_ONLY environment variable is set to avoid starting mysqld
if [ ! -z "$MYSQL_INIT_ONLY" ]; then

Check notice on line 484 in build/pxc-entrypoint.sh

View workflow job for this annotation

GitHub Actions / shellcheck

[shellcheck] build/pxc-entrypoint.sh#L484 <ShellCheck.SC2236>

Use -n instead of ! -z.
Raw output
./build/pxc-entrypoint.sh:484:7: info: Use -n instead of ! -z. (ShellCheck.SC2236)
echo 'Initialization complete, now exiting!'
exit 0
fi
fi

if [ "$1" = 'mysqld' -a -z "$wantHelp" ]; then

Check warning on line 490 in build/pxc-entrypoint.sh

View workflow job for this annotation

GitHub Actions / shellcheck

[shellcheck] build/pxc-entrypoint.sh#L490 <ShellCheck.SC2166>

Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
Raw output
./build/pxc-entrypoint.sh:490:22: warning: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. (ShellCheck.SC2166)
# still need to check config, container may have started with --user
_check_config "$@"

Expand All @@ -500,28 +502,28 @@
pxc_version=''
if [ -f "$DATADIR/version_info" ]; then
pxc_version_file="$DATADIR/version_info"
pxc_version=$(cat "$pxc_version_file" | awk '{print $3}')

Check notice on line 505 in build/pxc-entrypoint.sh

View workflow job for this annotation

GitHub Actions / shellcheck

[shellcheck] build/pxc-entrypoint.sh#L505 <ShellCheck.SC2002>

Useless cat. Consider 'cmd < file | ..' or 'cmd file | ..' instead.
Raw output
./build/pxc-entrypoint.sh:505:21: info: Useless cat. Consider 'cmd < file | ..' or 'cmd file | ..' instead. (ShellCheck.SC2002)
elif [ -f "$DATADIR/xtrabackup_info" ]; then
pxc_version_file="$DATADIR/xtrabackup_info"
pxc_version=$(grep 'server_version' "$pxc_version_file" | awk '{print $3}' | tr -d '\n')
fi

if [[ -f $pxc_version_file && -n $pxc_version && $MYSQL_VERSION == '5.7' ]] && [[ $(cat /tmp/version_info) != $pxc_version ]]; then

Check warning on line 511 in build/pxc-entrypoint.sh

View workflow job for this annotation

GitHub Actions / shellcheck

[shellcheck] build/pxc-entrypoint.sh#L511 <ShellCheck.SC2053>

Quote the right-hand side of != in [[ ]] to prevent glob matching.
Raw output
./build/pxc-entrypoint.sh:511:112: warning: Quote the right-hand side of != in [[ ]] to prevent glob matching. (ShellCheck.SC2053)
SOCKET="$(_get_config 'socket' "$@")"
"$@" --skip-networking --socket="${SOCKET}" --wsrep-provider='none' &
pid="$!"

mysql=(mysql --protocol=socket -uroot -hlocalhost --socket="${SOCKET}" --password="")
{ set +x; } 2>/dev/null
if [ ! -z "$MYSQL_ROOT_PASSWORD" ]; then

Check notice on line 518 in build/pxc-entrypoint.sh

View workflow job for this annotation

GitHub Actions / shellcheck

[shellcheck] build/pxc-entrypoint.sh#L518 <ShellCheck.SC2236>

Use -n instead of ! -z.
Raw output
./build/pxc-entrypoint.sh:518:8: info: Use -n instead of ! -z. (ShellCheck.SC2236)
mysql+=(-p"${MYSQL_ROOT_PASSWORD}")
fi
set -x

if [[ ${MYSQL_VERSION} == '8.0' ]]; then
if [[ "$MYSQL_VERSION" =~ ^(8\.0|8\.4)$ ]]; then
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 🐶

Suggested change
if [[ "$MYSQL_VERSION" =~ ^(8\.0|8\.4)$ ]]; then
if [[ $MYSQL_VERSION =~ ^(8\.0|8\.4)$ ]]; then

mysqlState="startup"
while [[ "${mysqlState}" != "ready" ]]; do
mysqlState=$(tr -d '\0' < ${MYSQL_STATE_FILE})

Check notice on line 526 in build/pxc-entrypoint.sh

View workflow job for this annotation

GitHub Actions / shellcheck

[shellcheck] build/pxc-entrypoint.sh#L526 <ShellCheck.SC2086>

Double quote to prevent globbing and word splitting.
Raw output
./build/pxc-entrypoint.sh:526:31: info: Double quote to prevent globbing and word splitting. (ShellCheck.SC2086)
Comment on lines 525 to 526
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 🐶

Suggested change
while [[ "${mysqlState}" != "ready" ]]; do
mysqlState=$(tr -d '\0' < ${MYSQL_STATE_FILE})
while [[ ${mysqlState} != "ready" ]]; do
mysqlState=$(tr -d '\0' <${MYSQL_STATE_FILE})

echo >&2 "MySQL upgrade process in progress..."
sleep 1
done
Expand Down Expand Up @@ -551,16 +553,16 @@
POD_NAMESPACE=$(cat /var/run/secrets/kubernetes.io/serviceaccount/namespace)

wsrep_start_position_opt=""
if [ "$1" = 'mysqld' -a -z "$wantHelp" ]; then

Check warning on line 556 in build/pxc-entrypoint.sh

View workflow job for this annotation

GitHub Actions / shellcheck

[shellcheck] build/pxc-entrypoint.sh#L556 <ShellCheck.SC2166>

Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
Raw output
./build/pxc-entrypoint.sh:556:22: warning: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. (ShellCheck.SC2166)
DATADIR="$(_get_config 'datadir' "$@")"
grastate_loc="${DATADIR}/grastate.dat"
wsrep_verbose_logfile="$DATADIR/wsrep_recovery_verbose.log"
if [ -f "$wsrep_verbose_logfile" ]; then
cat "$wsrep_verbose_logfile" | tee -a "$DATADIR/wsrep_recovery_verbose_history.log"

Check notice on line 561 in build/pxc-entrypoint.sh

View workflow job for this annotation

GitHub Actions / shellcheck

[shellcheck] build/pxc-entrypoint.sh#L561 <ShellCheck.SC2002>

Useless cat. Consider 'cmd < file | ..' or 'cmd file | ..' instead.
Raw output
./build/pxc-entrypoint.sh:561:7: info: Useless cat. Consider 'cmd < file | ..' or 'cmd file | ..' instead. (ShellCheck.SC2002)
rm -f "$wsrep_verbose_logfile"
fi

if [ -s "$grastate_loc" -a -d "$DATADIR/mysql" ]; then

Check warning on line 565 in build/pxc-entrypoint.sh

View workflow job for this annotation

GitHub Actions / shellcheck

[shellcheck] build/pxc-entrypoint.sh#L565 <ShellCheck.SC2166>

Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
Raw output
./build/pxc-entrypoint.sh:565:26: warning: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. (ShellCheck.SC2166)
uuid=$(grep 'uuid:' "$grastate_loc" | cut -d: -f2 | tr -d ' ' || :)
seqno=$(grep 'seqno:' "$grastate_loc" | cut -d: -f2 | tr -d ' ' || :)
safe_to_bootstrap=$(grep 'safe_to_bootstrap:' "$grastate_loc" | cut -d: -f2 | tr -d ' ' || :)
Expand All @@ -575,11 +577,11 @@
fi
fi

if [ -z "$wsrep_start_position_opt" -a -d "$DATADIR/mysql" ]; then

Check warning on line 580 in build/pxc-entrypoint.sh

View workflow job for this annotation

GitHub Actions / shellcheck

[shellcheck] build/pxc-entrypoint.sh#L580 <ShellCheck.SC2166>

Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
Raw output
./build/pxc-entrypoint.sh:580:38: warning: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. (ShellCheck.SC2166)
"$@" --wsrep_recover --log-error-verbosity=3 --log_error="$wsrep_verbose_logfile"

echo >&2 "WSREP: Print recovery logs: "
cat "$wsrep_verbose_logfile" | tee -a "$DATADIR/wsrep_recovery_verbose_history.log"

Check notice on line 584 in build/pxc-entrypoint.sh

View workflow job for this annotation

GitHub Actions / shellcheck

[shellcheck] build/pxc-entrypoint.sh#L584 <ShellCheck.SC2002>

Useless cat. Consider 'cmd < file | ..' or 'cmd file | ..' instead.
Raw output
./build/pxc-entrypoint.sh:584:7: info: Useless cat. Consider 'cmd < file | ..' or 'cmd file | ..' instead. (ShellCheck.SC2002)
if grep ' Recovered position:' "$wsrep_verbose_logfile"; then
start_pos="$(
grep ' Recovered position:' "$wsrep_verbose_logfile" |
Expand Down Expand Up @@ -616,7 +618,7 @@
sed -i 's/safe_to_bootstrap: 0/safe_to_bootstrap: 1/g' "$grastate_loc"
fi
echo "Recovery was finished."
exec "$@" $wsrep_start_position_opt

Check notice on line 621 in build/pxc-entrypoint.sh

View workflow job for this annotation

GitHub Actions / shellcheck

[shellcheck] build/pxc-entrypoint.sh#L621 <ShellCheck.SC2086>

Double quote to prevent globbing and word splitting.
Raw output
./build/pxc-entrypoint.sh:621:14: info: Double quote to prevent globbing and word splitting. (ShellCheck.SC2086)
}
function is_manual_recovery() {
set +o xtrace
Expand Down Expand Up @@ -669,7 +671,7 @@
fi
fi

test -e /opt/percona/hookscript/hook.sh && source /opt/percona/hookscript/hook.sh

Check notice on line 674 in build/pxc-entrypoint.sh

View workflow job for this annotation

GitHub Actions / shellcheck

[shellcheck] build/pxc-entrypoint.sh#L674 <ShellCheck.SC1091>

Not following: /opt/percona/hookscript/hook.sh was not specified as input (see shellcheck -x).
Raw output
./build/pxc-entrypoint.sh:674:51: info: Not following: /opt/percona/hookscript/hook.sh was not specified as input (see shellcheck -x). (ShellCheck.SC1091)

init_opt=""
if [[ -f /etc/mysql/init-file/init.sql ]]; then
Expand All @@ -677,4 +679,4 @@
echo "Using init-file: /etc/mysql/init-file/init.sql"
fi

exec "$@" ${wsrep_start_position_opt} ${init_opt}

Check notice on line 682 in build/pxc-entrypoint.sh

View workflow job for this annotation

GitHub Actions / shellcheck

[shellcheck] build/pxc-entrypoint.sh#L682 <ShellCheck.SC2086>

Double quote to prevent globbing and word splitting.
Raw output
./build/pxc-entrypoint.sh:682:11: info: Double quote to prevent globbing and word splitting. (ShellCheck.SC2086)
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ spec:
resources:
limits:
cpu: "1"
memory: 1G
memory: 2G
requests:
cpu: 600m
memory: 1G
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ spec:
resources:
limits:
cpu: "1"
memory: 1G
memory: 2G
requests:
cpu: 600m
memory: 1G
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ spec:
resources:
limits:
cpu: "1"
memory: 1G
memory: 2G
requests:
cpu: 600m
memory: 1G
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ spec:
resources:
limits:
cpu: "1"
memory: 1G
memory: 2G
requests:
cpu: 600m
memory: 1G
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ spec:
resources:
limits:
cpu: "1"
memory: 1G
memory: 2G
requests:
cpu: 600m
memory: 1G
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ spec:
resources:
limits:
cpu: "1"
memory: 1G
memory: 2G
requests:
cpu: 600m
memory: 1G
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ spec:
resources:
limits:
cpu: "1"
memory: 1G
memory: 2G
requests:
cpu: 600m
memory: 1G
Expand Down
2 changes: 1 addition & 1 deletion e2e-tests/affinity/compare/statefulset_zone-pxc-k127.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ spec:
resources:
limits:
cpu: "1"
memory: 1G
memory: 2G
requests:
cpu: 600m
memory: 1G
Expand Down
2 changes: 1 addition & 1 deletion e2e-tests/affinity/conf/custom.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ spec:
memory: 1G
cpu: 600m
limits:
memory: "1G"
memory: "2G"
cpu: "1"
volumeSpec:
persistentVolumeClaim:
Expand Down
2 changes: 1 addition & 1 deletion e2e-tests/affinity/conf/hostname.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ spec:
memory: 1G
cpu: 600m
limits:
memory: "1G"
memory: "2G"
cpu: "1"
volumeSpec:
persistentVolumeClaim:
Expand Down
2 changes: 1 addition & 1 deletion e2e-tests/affinity/conf/region.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ spec:
memory: 1G
cpu: 600m
limits:
memory: "1G"
memory: "2G"
cpu: "1"
volumeSpec:
persistentVolumeClaim:
Expand Down
2 changes: 1 addition & 1 deletion e2e-tests/affinity/conf/zone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ spec:
memory: 1G
cpu: 600m
limits:
memory: "1G"
memory: "2G"
cpu: "1"
volumeSpec:
persistentVolumeClaim:
Expand Down
2 changes: 1 addition & 1 deletion e2e-tests/auto-tuning/conf/auto-tuning-with-limits.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ spec:
image: -pxc
resources:
limits:
memory: 1Gi
memory: 2Gi
cpu: 1000m
volumeSpec:
persistentVolumeClaim:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ spec:
image: -pxc
resources:
limits:
memory: 1Gi
memory: 4Gi
requests:
memory: 1Gi
volumeSpec:
Expand Down
4 changes: 2 additions & 2 deletions e2e-tests/auto-tuning/conf/auto-tuning-with-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ spec:
pxc:
configuration: |
[mysqld]
innodb_buffer_pool_size={{containerMemoryLimit}}
innodb_buffer_pool_size={{containerMemoryLimit * 1 / 2}}
max_connections=200
size: 3
image: -pxc
resources:
requests:
memory: 1Gi
limits:
memory: 2Gi
memory: 4Gi
volumeSpec:
persistentVolumeClaim:
resources:
Expand Down
4 changes: 2 additions & 2 deletions e2e-tests/auto-tuning/run
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ CONNECTIONS=$(run_mysql \
'SELECT @@max_connections;' \
"-h $cluster-pxc -uroot -proot_password")

if [[ ${INNODB_SIZE} != 805306368 ]]; then
echo "with-template-transform: innodb_buffer_pool_size ${INNODB_SIZE} should be 805306368"
if [[ ${INNODB_SIZE} != 3221225472 ]]; then
echo "with-template-transform: innodb_buffer_pool_size ${INNODB_SIZE} should be 3221225472"
exit 1
fi

Expand Down
12 changes: 12 additions & 0 deletions e2e-tests/big-data/conf/restore-backup-84.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: pxc.percona.com/v1
kind: PerconaXtraDBClusterRestore
metadata:
name: restore1
spec:
pxcCluster: some-name
backupSource:
destination: s3://percona-jenkins-artifactory/big-data-test/some-name-2024-11-23-19:32:52-full
s3:
credentialsSecret: aws-s3-secret
region: us-east-1
endpointUrl: https://s3.amazonaws.com
4 changes: 3 additions & 1 deletion e2e-tests/big-data/run
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,12 @@ main() {
desc 'create first PXC cluster'
cluster="some-name"
spinup_pxc "$cluster" "$test_dir/conf/$cluster.yml" "3" "10" "$test_dir/conf/secrets_without_tls.yml"

if [[ $IMAGE_PXC =~ 8\.0 ]]; then
desc 'Switch to 8.0 backup'
kubectl_bin apply -f "${test_dir}/conf/restore-backup.yml"
elif [[ $IMAGE_PXC =~ 8\.4 ]]; then
desc 'Switch to 8.4 backup'
kubectl_bin apply -f "${test_dir}/conf/restore-backup-84.yml"
else
kubectl_bin apply -f "${test_dir}/conf/restore-backup-57.yml"
fi
Expand Down
2 changes: 1 addition & 1 deletion e2e-tests/conf/some-name.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ spec:
memory: 0.1G
cpu: 100m
limits:
memory: "1G"
memory: "2G"
cpu: "1"
volumeSpec:
persistentVolumeClaim:
Expand Down
2 changes: 1 addition & 1 deletion e2e-tests/cross-site/conf/cross-site-replica.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ spec:
memory: 1G
cpu: 600m
limits:
memory: "1G"
memory: "2G"
cpu: "1"
volumeSpec:
persistentVolumeClaim:
Expand Down
2 changes: 1 addition & 1 deletion e2e-tests/cross-site/conf/cross-site-source.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ spec:
memory: 1G
cpu: 600m
limits:
memory: "1G"
memory: "2G"
cpu: "1"
volumeSpec:
persistentVolumeClaim:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ spec:
memory: 0.1G
cpu: 100m
limits:
memory: "1G"
memory: "2G"
cpu: "1"
volumeSpec:
persistentVolumeClaim:
Expand Down
2 changes: 1 addition & 1 deletion e2e-tests/demand-backup/conf/demand-backup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ spec:
memory: 0.1G
cpu: 100m
limits:
memory: "1G"
memory: "2G"
cpu: "1"
volumeSpec:
persistentVolumeClaim:
Expand Down
10 changes: 10 additions & 0 deletions e2e-tests/functions
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,8 @@ compare_kubectl() {

if [[ $IMAGE_PXC =~ 8\.0 ]] && [ -f ${expected_result//.yml/-80.yml} ]; then
expected_result=${expected_result//.yml/-80.yml}
elif [[ $IMAGE_PXC =~ 8\.4 ]] && [ -f ${expected_result//.yml/-84.yml} ]; then
expected_result=${expected_result//.yml/-84.yml}
fi

if version_gt "1.29" && [ -f ${expected_result//.yml/-k129.yml} ]; then
Expand Down Expand Up @@ -541,6 +543,8 @@ compare_mysql_cmd() {

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
fi

run_mysql "$command" "$uri" \
Expand All @@ -564,6 +568,8 @@ compare_mysql_cmd_local() {

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
fi

run_mysql_local "$command" "$uri" "$pod" "$container_name" \
Expand Down Expand Up @@ -607,6 +613,8 @@ compare_mysql_user() {

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
fi

(run_mysql "SHOW GRANTS;" "$uri" || :) \
Expand All @@ -625,6 +633,8 @@ compare_mysql_user_local() {

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
fi

(run_mysql_local "SHOW GRANTS;" "$uri" "$pod" "$container_name" || :) \
Expand Down
2 changes: 1 addition & 1 deletion e2e-tests/haproxy/conf/haproxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ spec:
memory: 0.1G
cpu: 100m
limits:
memory: "1G"
memory: "2G"
cpu: "1"
volumeSpec:
persistentVolumeClaim:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
67108864
3 changes: 3 additions & 0 deletions e2e-tests/init-deploy/compare/monitor-84.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
GRANT SELECT, RELOAD, PROCESS, SUPER, REPLICATION CLIENT ON *.* TO `monitor`@`%`
GRANT SERVICE_CONNECTION_ADMIN,SYSTEM_USER ON *.* TO `monitor`@`%`
GRANT SELECT ON `performance_schema`.* TO `monitor`@`%`
2 changes: 2 additions & 0 deletions e2e-tests/init-deploy/compare/root-84.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE, CREATE ROLE, DROP ROLE ON *.* TO `root`@`%` WITH GRANT OPTION
GRANT ALLOW_NONEXISTENT_DEFINER,APPLICATION_PASSWORD_ADMIN,AUDIT_ABORT_EXEMPT,AUDIT_ADMIN,AUTHENTICATION_POLICY_ADMIN,BACKUP_ADMIN,BINLOG_ADMIN,BINLOG_ENCRYPTION_ADMIN,CLONE_ADMIN,CONNECTION_ADMIN,ENCRYPTION_KEY_ADMIN,FIREWALL_EXEMPT,FLUSH_OPTIMIZER_COSTS,FLUSH_PRIVILEGES,FLUSH_STATUS,FLUSH_TABLES,FLUSH_USER_RESOURCES,GROUP_REPLICATION_ADMIN,GROUP_REPLICATION_STREAM,INNODB_REDO_LOG_ARCHIVE,INNODB_REDO_LOG_ENABLE,OPTIMIZE_LOCAL_TABLE,PASSWORDLESS_USER_ADMIN,PERSIST_RO_VARIABLES_ADMIN,REPLICATION_APPLIER,REPLICATION_SLAVE_ADMIN,RESOURCE_GROUP_ADMIN,RESOURCE_GROUP_USER,ROLE_ADMIN,SENSITIVE_VARIABLES_OBSERVER,SERVICE_CONNECTION_ADMIN,SESSION_VARIABLES_ADMIN,SET_ANY_DEFINER,SHOW_ROUTINE,SYSTEM_VARIABLES_ADMIN,TABLE_ENCRYPTION_ADMIN,TELEMETRY_LOG_ADMIN,TRANSACTION_GTID_TAG,XA_RECOVER_ADMIN ON *.* TO `root`@`%` WITH GRANT OPTION
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ spec:
resources:
limits:
cpu: "1"
memory: 1G
memory: 2G
requests:
cpu: 100m
memory: 100M
Expand Down
Loading
Loading