(clusterInfo *tabby.Tabby, pvc *corev1.PersistentVolumeClaim)
| 184 | } |
| 185 | |
| 186 | func printPVCDiagnostics(clusterInfo *tabby.Tabby, pvc *corev1.PersistentVolumeClaim) { |
| 187 | clusterInfo.AddLine("PVC name", pvc.Name) |
| 188 | clusterInfo.AddLine("PVC phase", pvc.Status.Phase) |
| 189 | if pvc.Spec.StorageClassName != nil { |
| 190 | clusterInfo.AddLine("PVC storage class", *pvc.Spec.StorageClassName) |
| 191 | } |
| 192 | if pvc.Spec.VolumeName != "" { |
| 193 | clusterInfo.AddLine("PVC volume", pvc.Spec.VolumeName) |
| 194 | } |
| 195 | if node, ok := pvc.Annotations["volume.kubernetes.io/selected-node"]; ok { |
| 196 | clusterInfo.AddLine("PVC selected node", node) |
| 197 | } |
| 198 | for _, cond := range pvc.Status.Conditions { |
| 199 | clusterInfo.AddLine( |
| 200 | fmt.Sprintf("PVC condition %s", cond.Type), |
| 201 | fmt.Sprintf("%s: %s", cond.Reason, cond.Message), |
| 202 | ) |
| 203 | } |
| 204 | clusterInfo.AddLine("---", "---") |
| 205 | } |
| 206 | |
| 207 | func printNamespaceEvents(clusterInfo *tabby.Tabby, eventList *eventsv1.EventList) { |
| 208 | if len(eventList.Items) == 0 { |
no outgoing calls
no test coverage detected