When coming back to this code, there were some design choices that I didn't understand. This PR makes things more clear to me-from-the-present.
Specifically,
Rather than have a special kubeObjectFromValue (why?!), just provide a standard FromJSON instance for KubeObject
Rather than preserve the AST (i.e. Value) so we can later extract the images, just extract the images when we parse the KubeObject in the first place, which spares us having to keep the Value around
Rather than a custom image name parsing function, make Image instances of FromJSON and ToJSON
Delete unused functions and move ones that are used only once into where clauses
When coming back to this code, there were some design choices that I didn't understand. This PR makes things more clear to me-from-the-present.
Specifically,
kubeObjectFromValue
(why?!), just provide a standardFromJSON
instance forKubeObject
Value
) so we can later extract the images, just extract the images when we parse theKubeObject
in the first place, which spares us having to keep theValue
aroundImage
instances ofFromJSON
andToJSON
where
clausesDepends on #30