cluster data collection: add defensive checks to collection implementation
Open
easy fix
enhancement
- Dominant language
- Go
- Stars
- 15
- Forks
- 16
- PR merge metrics
- No merged PRs in 30d
Description
e.g., when we iterate over Daemon Sets, we scoop up the version thusly:
`Version: daemonSet.Annotations[versionAnnotation],`
In the event that a Daemon Set (or other k8s resource) has been installed without our expected annotation key, we should log a warning.
Additionally, `Image: &rc.Spec.Template.Spec.Containers[0].Image,` assignment in the same routine would benefit from checking for the unexpected case when the `Containers` slice is empty.
Contributor guide
Assessment
This issue has not been assessed yet.