Closed
Description
In order to support different types of input format (dab, compose v1, compose v2, etc) and break down the convert function as well, I am thinking about creating a generic struct like this:
type komposeSet struct {
Image string
Name string
Volume []Volumes
Network []Networks
Environment []string
Port []Ports
Command string
}
I will think more on mandatory fields need to be declared of this struct.
Idea behind is that we take file from different input, build corresponding parsing
function to map it to komposeSet
struct. Then the main convert function will only do the transformation from komposeSet
to k8s controllers and service. With that strategy, we also can cut-off the dependency on libcompose's structs between versions.
Thought ?