@@ -22,21 +22,6 @@ commands:
2222 exit 1
2323 }
2424
25- scrape_metrics=$(kubectl exec "${pod}" -c collector -n "${NAMESPACE}" -- \
26- curl --insecure --silent http://localhost:9187/metrics)
27- { contains "${scrape_metrics}" 'ccp_connection_stats_active'; } || {
28- retry "5 second metric not found"
29- exit 1
30- }
31- { contains "${scrape_metrics}" 'ccp_database_size_bytes'; } || {
32- retry "5 minute metric not found"
33- exit 1
34- }
35- { contains "${scrape_metrics}" 'patroni_postgres_running'; } || {
36- retry "patroni metric not found"
37- exit 1
38- }
39-
4025 logs=$(kubectl logs "${pod}" --namespace "${NAMESPACE}" -c collector | grep InstrumentationScope)
4126 { contains "${logs}" 'InstrumentationScope patroni'; } || {
4227 retry "patroni logs not found"
@@ -51,6 +36,21 @@ commands:
5136 exit 1
5237 }
5338
39+ scrape_metrics=$(kubectl exec "${pod}" -c collector -n "${NAMESPACE}" -- \
40+ curl --insecure --silent http://localhost:9187/metrics)
41+ { contains "${scrape_metrics}" 'ccp_connection_stats_active'; } || {
42+ retry "5 second metric not found"
43+ exit 1
44+ }
45+ { contains "${scrape_metrics}" 'patroni_postgres_running'; } || {
46+ retry "patroni metric not found"
47+ exit 1
48+ }
49+ { contains "${scrape_metrics}" 'ccp_database_size_bytes'; } || {
50+ retry "5 minute metric not found"
51+ exit 1
52+ }
53+
5454 kubectl exec --stdin "${pod}" --namespace "${NAMESPACE}" -c database \
5555 -- psql -qb --set ON_ERROR_STOP=1 --file=- <<'SQL'
5656 DO $$
0 commit comments