Skip to content
Draft
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
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
apiVersion: kuttl.dev/v1beta1
kind: TestStep
timeout: 10
commands:
- script: |-
set -o errexit
Expand All @@ -13,3 +12,4 @@ commands:
deploy_client
deploy_s3_secrets
deploy_minio
timeout: 10
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
apiVersion: kuttl.dev/v1beta1
kind: TestStep
timeout: 10
commands:
- script: |-
set -o errexit
Expand All @@ -9,3 +8,4 @@ commands:
source ../../functions

get_cr | kubectl -n "${NAMESPACE}" apply -f -
timeout: 10
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
apiVersion: kuttl.dev/v1beta1
kind: TestStep
timeout: 30
commands:
- script: |-
set -o errexit
Expand All @@ -11,3 +10,4 @@ commands:
data=$(kubectl -n ${NAMESPACE} exec $(get_client_pod) -- psql -v ON_ERROR_STOP=1 -t -q postgres://postgres:$(get_psql_user_pass builtin-extensions-pguser-postgres)@$(get_psql_user_host builtin-extensions-pguser-postgres) -c "\c postgres" -c "SELECT extname FROM pg_extension ORDER BY extname")

kubectl create configmap -n "${NAMESPACE}" 02-check-extensions --from-literal=data="${data}"
timeout: 30
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
apiVersion: kuttl.dev/v1beta1
kind: TestStep
timeout: 30
commands:
- script: |-
set -o errexit
Expand All @@ -11,3 +10,4 @@ commands:
data=$(kubectl -n ${NAMESPACE} exec $(get_client_pod) -- psql -v ON_ERROR_STOP=1 -t -q postgres://postgres:$(get_psql_user_pass builtin-extensions-pguser-postgres)@$(get_psql_user_host builtin-extensions-pguser-postgres) -c "\c postgres" -c "SELECT extname FROM pg_extension ORDER BY extname")

kubectl create configmap -n "${NAMESPACE}" 04-check-extensions --from-literal=data="${data}"
timeout: 30
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
apiVersion: kuttl.dev/v1beta1
kind: TestStep
timeout: 30
commands:
- script: |-
set -o errexit
Expand All @@ -11,3 +10,4 @@ commands:
data=$(kubectl -n ${NAMESPACE} exec $(get_client_pod) -- psql -v ON_ERROR_STOP=1 -t -q postgres://postgres:$(get_psql_user_pass builtin-extensions-pguser-postgres)@$(get_psql_user_host builtin-extensions-pguser-postgres) -c "\c postgres" -c "SELECT extname FROM pg_extension ORDER BY extname")

kubectl create configmap -n "${NAMESPACE}" 06-check-extensions --from-literal=data="${data}"
timeout: 30
4 changes: 2 additions & 2 deletions e2e-tests/tests/cert-manager-tls/00-deploy-operator.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
apiVersion: kuttl.dev/v1beta1
kind: TestStep
timeout: 10
commands:
- script: |-
set -o errexit
Expand All @@ -11,4 +10,5 @@ commands:

deploy_cert_manager
deploy_operator
deploy_client
deploy_client
timeout: 10
4 changes: 2 additions & 2 deletions e2e-tests/tests/cert-manager-tls/01-create-cluster.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
apiVersion: kuttl.dev/v1beta1
kind: TestStep
timeout: 10
commands:
- script: |-
set -o errexit
Expand All @@ -9,4 +8,5 @@ commands:
source ../../functions

get_cr "cert-manager-tls" \
| kubectl -n "${NAMESPACE}" apply -f -
| kubectl -n "${NAMESPACE}" apply -f -
timeout: 10
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
apiVersion: kuttl.dev/v1beta1
kind: TestStep
timeout: 60
commands:
- script: |-
set -o errexit
Expand Down Expand Up @@ -60,3 +59,4 @@ commands:
fi
echo "Instance certificate $cert_name is ready"
done
timeout: 60
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
apiVersion: kuttl.dev/v1beta1
kind: TestStep
timeout: 120
commands:
- script: |-
set -o errexit
Expand Down Expand Up @@ -123,3 +122,4 @@ commands:
verify_secret_data "$secret_name" tls.crt tls.key dns.crt dns.key patroni.ca-roots patroni.crt-combined pgbackrest-server.crt pgbackrest-server.key
echo "Instance secret $secret_name is valid"
done
timeout: 120
4 changes: 2 additions & 2 deletions e2e-tests/tests/cert-manager-tls/05-read-from-primary.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
apiVersion: kuttl.dev/v1beta1
kind: TestStep
timeout: 30
commands:
- script: |-
set -o errexit
Expand All @@ -10,4 +9,5 @@ commands:

data=$(run_psql_local '\c myapp \\\ SELECT * from myApp;' "postgres:$(get_psql_user_pass cert-manager-tls-pguser-postgres)@$(get_psql_user_host cert-manager-tls-pguser-postgres)")

kubectl create configmap -n "${NAMESPACE}" 05-read-from-primary --from-literal=data="${data}"
kubectl create configmap -n "${NAMESPACE}" 05-read-from-primary --from-literal=data="${data}"
timeout: 30
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
apiVersion: kuttl.dev/v1beta1
kind: TestStep
timeout: 30
commands:
- script: |-
set -o errexit
Expand Down Expand Up @@ -32,4 +31,5 @@ commands:
exit 1
fi

kubectl create configmap -n "${NAMESPACE}" 06-verify-tls-connection --from-literal=status="verified"
kubectl create configmap -n "${NAMESPACE}" 06-verify-tls-connection --from-literal=status="verified"
timeout: 30
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
apiVersion: kuttl.dev/v1beta1
kind: TestStep
timeout: 30
commands:
- script: |-
set -o errexit
Expand Down Expand Up @@ -29,3 +28,4 @@ commands:
echo "PgBouncer-to-PostgreSQL connection is not using SSL"
exit 1
fi
timeout: 30
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
apiVersion: kuttl.dev/v1beta1
kind: TestStep
timeout: 30
commands:
- script: |-
set -o errexit
Expand All @@ -17,3 +16,4 @@ commands:
echo "No SSL replication connections found, got: $repl_ssl_count"
exit 1
fi
timeout: 30
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
apiVersion: kuttl.dev/v1beta1
kind: TestStep
timeout: 30
commands:
- script: |-
set -o errexit
Expand Down Expand Up @@ -34,3 +33,4 @@ commands:

# Verify pgBackRest works over TLS, not just cert file existence
kubectl -n "$NAMESPACE" exec "$instance" -c pgbackrest -- pgbackrest info
timeout: 30
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
apiVersion: kuttl.dev/v1beta1
kind: TestStep
timeout: 300
commands:
- script: |-
set -o errexit
Expand Down Expand Up @@ -101,3 +100,4 @@ commands:
done

wait_cluster_consistency cert-manager-tls
timeout: 300
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
apiVersion: kuttl.dev/v1beta1
kind: TestStep
timeout: 30
commands:
- script: |-
set -o errexit
Expand All @@ -15,3 +14,4 @@ commands:
run_psql_local \
'\c newapp \\\ INSERT INTO newApp (id) VALUES (200500)' \
"postgres:$(get_psql_user_pass cert-manager-tls-pguser-postgres)@$(get_psql_user_host cert-manager-tls-pguser-postgres)"
timeout: 30
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
apiVersion: kuttl.dev/v1beta1
kind: TestStep
timeout: 30
commands:
- script: |-
set -o errexit
Expand All @@ -14,3 +13,4 @@ commands:
echo "Missing data in primary"
exit 1
fi
timeout: 30
2 changes: 1 addition & 1 deletion e2e-tests/tests/custom-envs/00-deploy-operator.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
apiVersion: kuttl.dev/v1beta1
kind: TestStep
timeout: 10
commands:
- script: |-
set -o errexit
Expand All @@ -12,3 +11,4 @@ commands:
deploy_operator
deploy_client
deploy_s3_secrets
timeout: 10
2 changes: 1 addition & 1 deletion e2e-tests/tests/custom-envs/01-create-cluster.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
apiVersion: kuttl.dev/v1beta1
kind: TestStep
timeout: 20
commands:
- script: |-
set -o errexit
Expand All @@ -13,3 +12,4 @@ commands:
.spec.proxy.pgBouncer.replicas=1 |
.spec.instances[].replicas=1' - \
| kubectl -n "${NAMESPACE}" apply -f -
timeout: 20
3 changes: 1 addition & 2 deletions e2e-tests/tests/custom-envs/02-add-env-to-instance.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
apiVersion: kuttl.dev/v1beta1
kind: TestStep
timeout: 10
commands:
- script: |-
set -o errexit
Expand All @@ -12,7 +11,7 @@ commands:
.spec.instances[].replicas = 1 |
.spec.instances[].env = ((.spec.instances[].env // []) + [{"name": "FIRST_ENV", "value": "1000"}, {"name": "SECOND_ENV", "value": "2000"}] | unique_by(.name))
' - | kubectl -n "${NAMESPACE}" apply -f -

timeout: 10

sleep 10
wait_cluster_consistency custom-envs
Expand Down
4 changes: 2 additions & 2 deletions e2e-tests/tests/custom-envs/03-update-env-for-instance.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
apiVersion: kuttl.dev/v1beta1
kind: TestStep
timeout: 10
commands:
- script: |-
set -o errexit
Expand All @@ -16,4 +15,5 @@ commands:
sleep 10
wait_cluster_consistency custom-envs

check_envs_for_component add instance FIRST_ENV=2000 SECOND_ENV=2000
check_envs_for_component add instance FIRST_ENV=2000 SECOND_ENV=2000
timeout: 10
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
apiVersion: kuttl.dev/v1beta1
kind: TestStep
timeout: 20
commands:
- script: |-
set -o errexit
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
apiVersion: kuttl.dev/v1beta1
kind: TestStep
timeout: 20
commands:
- script: |-
set -o errexit
Expand All @@ -16,4 +15,4 @@ commands:
sleep 10
wait_cluster_consistency custom-envs
check_envs_for_component add instance DB_USER=myuser DB_PASSWORD=MyS3cretP@ss DB_NEW_ENV=new-value

timeout: 20
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
apiVersion: kuttl.dev/v1beta1
kind: TestStep
timeout: 30
commands:
- script: |-
set -o errexit
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
apiVersion: kuttl.dev/v1beta1
kind: TestStep
timeout: 10
commands:
- script: |-
set -o errexit
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
apiVersion: kuttl.dev/v1beta1
kind: TestStep
timeout: 30
commands:
- script: |-
set -o errexit
Expand Down
4 changes: 2 additions & 2 deletions e2e-tests/tests/custom-envs/09-add-env-to-pgbouncer.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
apiVersion: kuttl.dev/v1beta1
kind: TestStep
timeout: 10
commands:
- script: |-
set -o errexit
Expand All @@ -14,4 +13,5 @@ commands:
sleep 10
wait_cluster_consistency custom-envs

check_envs_for_component add pgbouncer FIRST_ENV=1000 SECOND_ENV=2000
check_envs_for_component add pgbouncer FIRST_ENV=1000 SECOND_ENV=2000
timeout: 10
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
apiVersion: kuttl.dev/v1beta1
kind: TestStep
timeout: 10
commands:
- script: |-
set -o errexit
Expand All @@ -18,4 +17,4 @@ commands:
wait_cluster_consistency custom-envs

check_envs_for_component add pgbouncer FIRST_ENV=2000 SECOND_ENV=2000

timeout: 10
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
apiVersion: kuttl.dev/v1beta1
kind: TestStep
timeout: 20
commands:
- script: |-
set -o errexit
Expand All @@ -21,3 +20,4 @@ commands:
sleep 10
wait_cluster_consistency custom-envs
check_envs_for_component add pgbouncer DB_USER=myuser DB_PASSWORD=MyS3cretP@ss
timeout: 20
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
apiVersion: kuttl.dev/v1beta1
kind: TestStep
timeout: 20
commands:
- script: |-
set -o errexit
Expand All @@ -15,4 +14,4 @@ commands:
sleep 10
wait_cluster_consistency custom-envs
check_envs_for_component add pgbouncer DB_USER=myuser DB_PASSWORD=MyS3cretP@ss DB_NEW_ENV=new-value

timeout: 20
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
apiVersion: kuttl.dev/v1beta1
kind: TestStep
timeout: 30
commands:
- script: |-
set -o errexit
Expand All @@ -22,4 +21,4 @@ commands:
wait_cluster_consistency custom-envs

check_envs_for_component add pgbouncer DB_USER_NEW=myuser2 DB_PASSWORD_NEW=NewS3cretP@ss

timeout: 30
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
apiVersion: kuttl.dev/v1beta1
kind: TestStep
timeout: 10
commands:
- script: |-
set -o errexit
Expand All @@ -19,4 +18,4 @@ commands:
wait_cluster_consistency custom-envs

check_envs_for_component delete pgbouncer FIRST_ENV SECOND_ENV

timeout: 10
Loading
Loading