troubleshoot
troubleshoot copied to clipboard
Outcomes title field ignored by analysers
Bug Description
Analysis result outcomes have an optional title field which can be used when multiple outcomes are defined, and when one would like to give specific outcomes more meaning by providing a more descriptive title.
Steps To Reproduce
apiVersion: troubleshoot.sh/v1beta2
kind: SupportBundle
metadata:
name: kurl-builtin-oncluster
spec:
collectors:
- clusterResources: {}
- clusterInfo: {}
analyzers:
- clusterPodStatuses:
checkName: "Pod(s) health status(es)"
outcomes:
- fail:
title: "Pod {{ .Name }} is unable to pull images"
when: "== ImagePullBackOff"
message: "A Pod, {{ .Name }}, is unable to pull its image. Status is: {{ .Status.Reason }}"
- warn:
title: "Pod {{ .Name }} is unhealthy"
when: "!= Healthy"
message: "A Pod, {{ .Name }}, is unhealthy with a status of: {{ .Status.Reason }}. Restarting the pod may fix the issue."
- pass:
title: "Pod {{ .Name }} is healthy"
message: "Pod {{ .Name }} is healthy"
Collecting a support bundle using the spec above, where we have some failing pods, would render an analysis like below
Expected Behavior
We expect to get results like below where each of the outcomes has a title with more context
Additional Context
- This struct that holds the title field is here
- Each analyser will need to be updated to consume the additional title field. At the moment each analyser by default uses the the anaylyser's checkName property as the title or a hard coded string. Take a look at the pod status analyser for example
Include the following information.
- Troubleshoot version: Affect all versions of troubleshoot