Mount script with tools for easy logaccess and watching objects.

This commit is contained in:
Jan Mußler 2020-10-22 23:35:43 +02:00
parent 0143a470b1
commit aa3100ca34
4 changed files with 13 additions and 0 deletions

View File

@ -10,4 +10,5 @@ docker run -it --entrypoint /bin/bash --network=host -e "TERM=xterm-256color" \
--mount type=bind,source="$(readlink -f manifests)",target=/manifests \
--mount type=bind,source="$(readlink -f tests)",target=/tests \
--mount type=bind,source="$(readlink -f exec.sh)",target=/exec.sh \
--mount type=bind,source="$(readlink -f scripts)",target=/scripts \
-e OPERATOR_IMAGE="${operator_image}" "${e2e_test_runner_image}"

View File

@ -64,6 +64,7 @@ function run_tests(){
--mount type=bind,source="$(readlink -f manifests)",target=/manifests \
--mount type=bind,source="$(readlink -f tests)",target=/tests \
--mount type=bind,source="$(readlink -f exec.sh)",target=/exec.sh \
--mount type=bind,source="$(readlink -f scripts)",target=/scripts \
-e OPERATOR_IMAGE="${operator_image}" "${e2e_test_runner_image}" ${E2E_TEST_CASE-} $@
}

2
e2e/scripts/get_logs.sh Executable file
View File

@ -0,0 +1,2 @@
#!/bin/bash
kubectl logs $(kubectl get pods -l name=postgres-operator --field-selector status.phase=Running -o jsonpath='{.items..metadata.name}')

9
e2e/scripts/watch_objects.sh Executable file
View File

@ -0,0 +1,9 @@
#!/bin/bash
watch -c "
kubectl get postgresql
echo
kubectl get pods
echo
kubectl get statefulsets
"