-
Notifications
You must be signed in to change notification settings - Fork 157
K8SPSMDB-755: Allow users to disallow invalid certificates #1523
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -10,32 +10,32 @@ run_backup() { | |||||||||||||||||
local storage=$1 | ||||||||||||||||||
local backup_name=$2 | ||||||||||||||||||
|
||||||||||||||||||
cat $test_dir/conf/backup.yml \ | ||||||||||||||||||
| $sed -e "s/name:/name: ${backup_name}/" \ | ||||||||||||||||||
| $sed -e "s/storageName:/storageName: ${storage}/" \ | ||||||||||||||||||
| kubectl_bin apply -f - | ||||||||||||||||||
cat $test_dir/conf/backup.yml | | ||||||||||||||||||
$sed -e "s/name:/name: ${backup_name}/" | | ||||||||||||||||||
$sed -e "s/storageName:/storageName: ${storage}/" | | ||||||||||||||||||
kubectl_bin apply -f - | ||||||||||||||||||
} | ||||||||||||||||||
|
||||||||||||||||||
run_restore() { | ||||||||||||||||||
local backup_name=$1 | ||||||||||||||||||
|
||||||||||||||||||
cat $test_dir/conf/restore.yml \ | ||||||||||||||||||
| $sed -e "s/name:/name: restore-${backup_name}/" \ | ||||||||||||||||||
| $sed -e "s/backupName:/backupName: ${backup_name}/" \ | ||||||||||||||||||
| kubectl_bin apply -f - | ||||||||||||||||||
cat $test_dir/conf/restore.yml | | ||||||||||||||||||
$sed -e "s/name:/name: restore-${backup_name}/" | | ||||||||||||||||||
$sed -e "s/backupName:/backupName: ${backup_name}/" | | ||||||||||||||||||
kubectl_bin apply -f - | ||||||||||||||||||
Comment on lines
+22
to
+25
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [shfmt] reported by reviewdog 🐶
Suggested change
|
||||||||||||||||||
} | ||||||||||||||||||
|
||||||||||||||||||
run_recovery_check() { | ||||||||||||||||||
local backup_name=$1 | ||||||||||||||||||
local compare_suffix=${2:-"_restore"} | ||||||||||||||||||
|
||||||||||||||||||
wait_restore "${backup_name}" "${cluster}" "requested" "0" "900" | ||||||||||||||||||
wait_restore "${backup_name}" "${cluster}" "requested" "0" "1200" | ||||||||||||||||||
echo | ||||||||||||||||||
|
||||||||||||||||||
compare_kubectl "statefulset/${cluster}-rs0" ${compare_suffix} | ||||||||||||||||||
|
||||||||||||||||||
# we don't wait for cluster readiness here because the annotation gets removed then | ||||||||||||||||||
wait_restore "${backup_name}" "${cluster}" "ready" "0" "1600" | ||||||||||||||||||
wait_restore "${backup_name}" "${cluster}" "ready" "0" "1800" | ||||||||||||||||||
kubectl_bin get psmdb ${cluster} -o yaml | ||||||||||||||||||
if [ $(kubectl_bin get psmdb ${cluster} -o yaml | yq '.metadata.annotations."percona.com/resync-pbm"') == null ]; then | ||||||||||||||||||
echo "psmdb/${cluster} should be annotated with percona.com/resync-pbm after a physical restore" | ||||||||||||||||||
|
@@ -77,8 +77,8 @@ wait_for_running ${cluster}-cfg 3 | |||||||||||||||||
wait_for_running ${cluster}-mongos 3 | ||||||||||||||||||
wait_cluster_consistency ${cluster} | ||||||||||||||||||
|
||||||||||||||||||
lbEndpoint=$(kubectl_bin get svc $cluster-mongos -o=jsonpath='{.status}' \ | ||||||||||||||||||
| jq -r 'select(.loadBalancer != null and .loadBalancer.ingress != null and .loadBalancer.ingress != []) | .loadBalancer.ingress[0][]') | ||||||||||||||||||
lbEndpoint=$(kubectl_bin get svc $cluster-mongos -o=jsonpath='{.status}' | | ||||||||||||||||||
jq -r 'select(.loadBalancer != null and .loadBalancer.ingress != null and .loadBalancer.ingress != []) | .loadBalancer.ingress[0][]') | ||||||||||||||||||
Comment on lines
+80
to
+81
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [shfmt] reported by reviewdog 🐶
Suggested change
|
||||||||||||||||||
if [ -z $lbEndpoint ]; then | ||||||||||||||||||
echo "mongos service not exported correctly" | ||||||||||||||||||
exit 1 | ||||||||||||||||||
|
Original file line number | Diff line number | Diff line change | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -10,32 +10,32 @@ run_backup() { | |||||||||||||||||
local storage=$1 | ||||||||||||||||||
local backup_name=$2 | ||||||||||||||||||
|
||||||||||||||||||
cat $test_dir/conf/backup.yml \ | ||||||||||||||||||
| $sed -e "s/name:/name: ${backup_name}/" \ | ||||||||||||||||||
| $sed -e "s/storageName:/storageName: ${storage}/" \ | ||||||||||||||||||
| kubectl_bin apply -f - | ||||||||||||||||||
cat $test_dir/conf/backup.yml | | ||||||||||||||||||
$sed -e "s/name:/name: ${backup_name}/" | | ||||||||||||||||||
$sed -e "s/storageName:/storageName: ${storage}/" | | ||||||||||||||||||
kubectl_bin apply -f - | ||||||||||||||||||
Comment on lines
+13
to
+16
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [shfmt] reported by reviewdog 🐶
Suggested change
|
||||||||||||||||||
} | ||||||||||||||||||
|
||||||||||||||||||
run_restore() { | ||||||||||||||||||
local backup_name=$1 | ||||||||||||||||||
|
||||||||||||||||||
cat $test_dir/conf/restore.yml \ | ||||||||||||||||||
| $sed -e "s/name:/name: restore-${backup_name}/" \ | ||||||||||||||||||
| $sed -e "s/backupName:/backupName: ${backup_name}/" \ | ||||||||||||||||||
| kubectl_bin apply -f - | ||||||||||||||||||
cat $test_dir/conf/restore.yml | | ||||||||||||||||||
$sed -e "s/name:/name: restore-${backup_name}/" | | ||||||||||||||||||
$sed -e "s/backupName:/backupName: ${backup_name}/" | | ||||||||||||||||||
kubectl_bin apply -f - | ||||||||||||||||||
Comment on lines
+22
to
+25
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [shfmt] reported by reviewdog 🐶
Suggested change
|
||||||||||||||||||
} | ||||||||||||||||||
|
||||||||||||||||||
run_recovery_check() { | ||||||||||||||||||
local backup_name=$1 | ||||||||||||||||||
local compare_suffix=${2:-"_restore"} | ||||||||||||||||||
|
||||||||||||||||||
wait_restore "${backup_name}" "${cluster}" "requested" "0" "900" | ||||||||||||||||||
wait_restore "${backup_name}" "${cluster}" "requested" "0" "1200" | ||||||||||||||||||
echo | ||||||||||||||||||
|
||||||||||||||||||
compare_kubectl "statefulset/${cluster}-rs0" ${compare_suffix} | ||||||||||||||||||
|
||||||||||||||||||
# we don't wait for cluster readiness here because the annotation gets removed then | ||||||||||||||||||
wait_restore "${backup_name}" "${cluster}" "ready" "0" "1600" | ||||||||||||||||||
wait_restore "${backup_name}" "${cluster}" "ready" "0" "1800" | ||||||||||||||||||
kubectl_bin get psmdb ${cluster} -o yaml | ||||||||||||||||||
if [ $(kubectl_bin get psmdb ${cluster} -o yaml | yq '.metadata.annotations."percona.com/resync-pbm"') == null ]; then | ||||||||||||||||||
echo "psmdb/${cluster} should be annotated with percona.com/resync-pbm after a physical restore" | ||||||||||||||||||
|
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 🐶