|
2 | 2 |
|
3 | 3 | # set root repo relatively to a test dir |
4 | 4 | ROOT_REPO=${ROOT_REPO:-$(realpath ../../..)} |
5 | | -CERT_MANAGER_VER="1.14.2" |
| 5 | +CERT_MANAGER_VER="1.15.3" |
6 | 6 | test_name=$(basename "$(pwd)") |
7 | 7 | source "${ROOT_REPO}/e2e-tests/vars.sh" |
8 | 8 |
|
@@ -58,6 +58,25 @@ deploy_operator() { |
58 | 58 | | kubectl -n "${OPERATOR_NS:-$NAMESPACE}" apply -f - |
59 | 59 | } |
60 | 60 |
|
| 61 | +update_operator() { |
| 62 | + local cw_prefix="" |
| 63 | + |
| 64 | + if [[ $OPERATOR_NS ]]; then |
| 65 | + cw_prefix="cw-" |
| 66 | + fi |
| 67 | + |
| 68 | + kubectl -n "${OPERATOR_NS:-$NAMESPACE}" apply --server-side --force-conflicts -f "${DEPLOY_DIR}/crd.yaml" |
| 69 | + kubectl -n "${OPERATOR_NS:-$NAMESPACE}" apply --server-side --force-conflicts -f "${DEPLOY_DIR}/${cw_prefix}rbac.yaml" |
| 70 | + |
| 71 | + local disable_telemetry=true |
| 72 | + if [ "${test_name}" == "telemetry-transfer" ]; then |
| 73 | + disable_telemetry=false |
| 74 | + fi |
| 75 | + |
| 76 | + kubectl -n "${OPERATOR_NS:-$NAMESPACE}" patch deployment percona-postgresql-operator -p \ |
| 77 | + '{"spec":{"template":{"spec":{"containers":[{"name":"operator","image":"'${IMAGE}'"}]}}}}' |
| 78 | +} |
| 79 | + |
61 | 80 | deploy_operator_gh() { |
62 | 81 | local git_tag="$1" |
63 | 82 | local cw_prefix="" |
@@ -740,3 +759,17 @@ get_container_image() { |
740 | 759 |
|
741 | 760 | echo "${IMAGE_BASE}:${operatorVersion}-ppg${pgVersion}-${component}" |
742 | 761 | } |
| 762 | + |
| 763 | +get_postgresql_logs() { |
| 764 | + local pgVersion=$1 |
| 765 | + |
| 766 | + for pod in $(kubectl get pods -l postgres-operator.crunchydata.com/data=postgres --no-headers | awk '{print $1}'); do |
| 767 | + local phase=$(kubectl -n ${NAMESPACE} get ${pod} -o jsonpath={".status.phase"}) |
| 768 | + if [[ "${phase}" != "Running" ]]; then |
| 769 | + echo "Waiting for ${pod} to start running" |
| 770 | + continue |
| 771 | + fi |
| 772 | + echo "find /pgdata/pg${pgVersion}/log -type f -iname 'postgresql*.log' -exec tail -n 30 {} \;" \ |
| 773 | + | kubectl -n ${NAMESPACE} exec -it ${pod} -- bash 2>/dev/null |
| 774 | + done |
| 775 | +} |
0 commit comments