Skip to content

Commit 4e97f2a

Browse files
sfc-gh-jmckulkajmckulk
authored andcommitted
add more logging
1 parent 778ad13 commit 4e97f2a

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

testing/chainsaw/e2e/pgbackrest-restore/templates/clone-cluster.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,28 @@ spec:
5151
updatedReplicas: 1
5252

5353
catch:
54+
- description: Describe the PostgresCluster to see its status
55+
describe:
56+
apiVersion: ($postgrescluster.apiVersion)
57+
kind: PostgresCluster
58+
name: ($name)
59+
60+
- description: Get all pods in the namespace to see what's running
61+
describe:
62+
apiVersion: v1
63+
kind: Pod
64+
selector: (join('', ['postgres-operator.crunchydata.com/cluster=', $name]))
65+
66+
- description: Get all jobs to check restore status
67+
describe:
68+
apiVersion: batch/v1
69+
kind: Job
70+
selector: (join('', ['postgres-operator.crunchydata.com/cluster=', $name]))
71+
72+
- description: Get events related to the cluster
73+
script:
74+
content: kubectl get events --field-selector (join('', ['involvedObject.name=', $name])) -o wide
75+
5476
- description: Read all log lines from job pods
5577
podLogs:
5678
selector: (join('', ['batch.kubernetes.io/job-name,', 'postgres-operator.crunchydata.com/cluster=', $name]))
@@ -60,3 +82,9 @@ spec:
6082
podLogs:
6183
selector: (join('', ['postgres-operator.crunchydata.com/instance,', 'postgres-operator.crunchydata.com/cluster=', $name]))
6284
tail: -1
85+
86+
- description: Check PVCs for the cluster
87+
describe:
88+
apiVersion: v1
89+
kind: PersistentVolumeClaim
90+
selector: (join('', ['postgres-operator.crunchydata.com/cluster=', $name]))

0 commit comments

Comments
 (0)