-
Notifications
You must be signed in to change notification settings - Fork 157
K8SPSMDB-1483: Add GCS native test - gcs service account email&key #2077
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
Conversation
echo 'Creating secrets and start client' | ||
kubectl_bin apply -f "$test_dir/conf/secrets.yml" -f "$conf_dir/client.yml" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[shfmt] reported by reviewdog 🐶
echo 'Creating secrets and start client' | |
kubectl_bin apply -f "$test_dir/conf/secrets.yml" -f "$conf_dir/client.yml" | |
echo 'Creating secrets and start client' | |
kubectl_bin apply -f "$test_dir/conf/secrets.yml" -f "$conf_dir/client.yml" |
local timeout="$1" | ||
shift | ||
|
||
local elapsed=0 | ||
until "$@"; do | ||
if (( elapsed >= timeout )); then | ||
echo "Timeout after ${timeout}s: command '$*' did not succeed" | ||
exit 1 | ||
fi | ||
sleep 1 && elapsed=$((elapsed + interval)) | ||
done | ||
|
||
return 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[shfmt] reported by reviewdog 🐶
local timeout="$1" | |
shift | |
local elapsed=0 | |
until "$@"; do | |
if (( elapsed >= timeout )); then | |
echo "Timeout after ${timeout}s: command '$*' did not succeed" | |
exit 1 | |
fi | |
sleep 1 && elapsed=$((elapsed + interval)) | |
done | |
return 0 | |
local timeout="$1" | |
shift | |
local elapsed=0 | |
until "$@"; do | |
if ((elapsed >= timeout)); then | |
echo "Timeout after ${timeout}s: command '$*' did not succeed" | |
exit 1 | |
fi | |
sleep 1 && elapsed=$((elapsed + interval)) | |
done | |
return 0 |
run_mongo 'db.getUser("myApp")' \ | ||
"userAdmin:userAdmin123456@$cluster-rs0.$namespace" \ | ||
| grep -q '"user" : "myApp"' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[shfmt] reported by reviewdog 🐶
run_mongo 'db.getUser("myApp")' \ | |
"userAdmin:userAdmin123456@$cluster-rs0.$namespace" \ | |
| grep -q '"user" : "myApp"' | |
run_mongo 'db.getUser("myApp")' \ | |
"userAdmin:userAdmin123456@$cluster-rs0.$namespace" \ | |
| grep -q '"user" : "myApp"' |
} | ||
|
||
delete_data() { | ||
local data="$1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[shfmt] reported by reviewdog 🐶
local data="$1" | |
local data="$1" |
run_mongo \ | ||
"use myApp\n db.test.deleteOne({ x: \"$data\" })" \ | ||
"myApp:myPass@$cluster-rs0.$namespace" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[shfmt] reported by reviewdog 🐶
run_mongo \ | |
"use myApp\n db.test.deleteOne({ x: \"$data\" })" \ | |
"myApp:myPass@$cluster-rs0.$namespace" | |
run_mongo \ | |
"use myApp\n db.test.deleteOne({ x: \"$data\" })" \ | |
"myApp:myPass@$cluster-rs0.$namespace" |
} | ||
|
||
verify_sts_not_ready() { | ||
local sts_name="${1:-some-name-rs0}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[shfmt] reported by reviewdog 🐶
local sts_name="${1:-some-name-rs0}" | |
local sts_name="${1:-some-name-rs0}" |
if is_sts_ready "$sts_name"; then | ||
echo "StatefulSet $sts_name is ready during the backup, failing..." | ||
exit 1 | ||
fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[shfmt] reported by reviewdog 🐶
if is_sts_ready "$sts_name"; then | |
echo "StatefulSet $sts_name is ready during the backup, failing..." | |
exit 1 | |
fi | |
if is_sts_ready "$sts_name"; then | |
echo "StatefulSet $sts_name is ready during the backup, failing..." | |
exit 1 | |
fi |
local sts_name="${1:-some-name-rs0}" | ||
local timeout="${2:-60}" | ||
local pod_name="${sts_name}-1" | ||
local interval=2 | ||
local elapsed=0 | ||
|
||
echo "Updating cluster with invalid image..." | ||
update_with_invalid_db_image | ||
|
||
echo -n "Wait for statefulset $sts_name to become not ready..." | ||
until ! is_sts_ready "$sts_name"; do | ||
if (( elapsed >= timeout )); then | ||
echo "Timeout reached: statefulSet $sts_name still has ready replicas" | ||
exit 1 | ||
fi | ||
sleep $interval && (( elapsed += interval )) | ||
echo -n . | ||
done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[shfmt] reported by reviewdog 🐶
local sts_name="${1:-some-name-rs0}" | |
local timeout="${2:-60}" | |
local pod_name="${sts_name}-1" | |
local interval=2 | |
local elapsed=0 | |
echo "Updating cluster with invalid image..." | |
update_with_invalid_db_image | |
echo -n "Wait for statefulset $sts_name to become not ready..." | |
until ! is_sts_ready "$sts_name"; do | |
if (( elapsed >= timeout )); then | |
echo "Timeout reached: statefulSet $sts_name still has ready replicas" | |
exit 1 | |
fi | |
sleep $interval && (( elapsed += interval )) | |
echo -n . | |
done | |
local sts_name="${1:-some-name-rs0}" | |
local timeout="${2:-60}" | |
local pod_name="${sts_name}-1" | |
local interval=2 | |
local elapsed=0 | |
echo "Updating cluster with invalid image..." | |
update_with_invalid_db_image | |
echo -n "Wait for statefulset $sts_name to become not ready..." | |
until ! is_sts_ready "$sts_name"; do | |
if ((elapsed >= timeout)); then | |
echo "Timeout reached: statefulSet $sts_name still has ready replicas" | |
exit 1 | |
fi | |
sleep $interval && ((elapsed += interval)) | |
echo -n . | |
done |
pbm_binary=/opt/percona/pbm | ||
fi | ||
|
||
kubectl_bin exec ${cluster}-rs0-0 -c ${container} -- ${pbm_binary} profile show ${profile} > ${tmp_dir}/pbm_profile_${profile}.yml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[shfmt] reported by reviewdog 🐶
kubectl_bin exec ${cluster}-rs0-0 -c ${container} -- ${pbm_binary} profile show ${profile} > ${tmp_dir}/pbm_profile_${profile}.yml | |
kubectl_bin exec ${cluster}-rs0-0 -c ${container} -- ${pbm_binary} profile show ${profile} >${tmp_dir}/pbm_profile_${profile}.yml |
pbm_binary=/opt/percona/pbm | ||
fi | ||
|
||
kubectl_bin exec ${cluster}-rs0-0 -c ${container} -- ${pbm_binary} config > ${tmp_dir}/pbm_config.yml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[shfmt] reported by reviewdog 🐶
kubectl_bin exec ${cluster}-rs0-0 -c ${container} -- ${pbm_binary} config > ${tmp_dir}/pbm_config.yml | |
kubectl_bin exec ${cluster}-rs0-0 -c ${container} -- ${pbm_binary} config >${tmp_dir}/pbm_config.yml |
commit: bb7550a |
CHANGE DESCRIPTION
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
Needs Doc
) and QA (Needs QA
)?Tests
compare/*-oc.yml
)?Config/Logging/Testability