helm-dashboard
helm-dashboard copied to clipboard
Display summary of involved container images
On the Resources tab, display all container images with their tags, to ease understanding of image versions.
Current idea is the button that would open a flyout with list of tags and their respective resources.
On the backend, we can gather that info while getting status information for resources. The image information is not supposed to change for particular revision, so it's safe to cache.
Unmarshaling of the manifest is happening against Carp struct in which I don't see any mapping for Image. https://github.com/komodorio/helm-dashboard/blob/main/pkg/dashboard/subproc/data.go#L342
Any other struct which can help here?
There can be two solution routes here.
One route is to unmarshal into Carp
, look at resource Kind
and then re-unmarshal into corresponding dedicated struct and get images information from particular fields of it. Would only display images that we envisioned to display. Has its pros and cons.
Another route is to unmarshal into universal map[string]interface{}
and then traverse the resulting tree recursively to find any keys with name image
and gather their value. The risk here is that it would get some wrong field that is not a container image, and would not get the value if the key name is not image
. But it would handle all CRDs etc. So also has pros and cons.