File tree Expand file tree Collapse file tree 4 files changed +36
-2
lines changed
Expand file tree Collapse file tree 4 files changed +36
-2
lines changed Original file line number Diff line number Diff line change 1+ ---
12apiVersion : postgres-operator.crunchydata.com/v1beta1
23kind : PostgresCluster
34metadata :
@@ -9,6 +10,22 @@ status:
910 replicas : 2
1011 updatedReplicas : 2
1112---
13+ # Patroni labels and readiness happen separately.
14+ # The next step expects to find pods by their role label; wait for them here.
15+ apiVersion : v1
16+ kind : Pod
17+ metadata :
18+ labels :
19+ postgres-operator.crunchydata.com/cluster : delete-switchover
20+ postgres-operator.crunchydata.com/role : master
21+ ---
22+ apiVersion : v1
23+ kind : Pod
24+ metadata :
25+ labels :
26+ postgres-operator.crunchydata.com/cluster : delete-switchover
27+ postgres-operator.crunchydata.com/role : replica
28+ ---
1229apiVersion : batch/v1
1330kind : Job
1431metadata :
Original file line number Diff line number Diff line change 22apiVersion : kuttl.dev/v1beta1
33kind : TestStep
44commands :
5- # Label instance pods with their current role for assert
5+ # Label instance pods with their current role. These labels will stick around
6+ # because switchover does not recreate any pods.
67 - script : |
78 kubectl label --namespace="${NAMESPACE}" pods \
89 --selector='postgres-operator.crunchydata.com/role=master' \
Original file line number Diff line number Diff line change 11---
2- # After switchover, a former replica should now be the primary.
2+ # Wait for switchover to finish. A former replica should now be the primary.
33apiVersion : v1
44kind : Pod
55metadata :
Original file line number Diff line number Diff line change 99 replicas : 2
1010 readyReplicas : 2
1111 updatedReplicas : 2
12+ ---
13+ # Patroni labels and readiness happen separately.
14+ # The next step expects to find pods by their role label; wait for them here.
15+ apiVersion : v1
16+ kind : Pod
17+ metadata :
18+ labels :
19+ postgres-operator.crunchydata.com/cluster : switchover
20+ postgres-operator.crunchydata.com/role : master
21+ ---
22+ apiVersion : v1
23+ kind : Pod
24+ metadata :
25+ labels :
26+ postgres-operator.crunchydata.com/cluster : switchover
27+ postgres-operator.crunchydata.com/role : replica
You can’t perform that action at this time.
0 commit comments