-
Notifications
You must be signed in to change notification settings - Fork 202
Add Kompose support #941
Comments
Sounds good to me! A few random thoughts:
|
Yes, that was the idea to pickup kompose files directly from src/main, like we do for fragments. Maybe we should add an |
|
@hrishin a few thoughts:
We could get the plugin to download on the fly and install the binary; we do this with the setup goal https://maven.fabric8.io/#fabric8:setup So maybe if the binary is not found, we could recommend to the user they install it by hand and add it to $PATH (maybe with a download URL) - we could add the binary to those installed by |
@jstrachan thanks for confirmation, though it's mentioned in the flow :)
Here target directory is Instead of manipulating these directories with |
yeah, we should change fabric8-maven-plugin to also look in some canonical directory for generated fragments by other tools like kompose/kedge. Maybe something like |
@jstrachan @rhuss
I had discussion with @pradeepto as well with above points. sounds okay? |
@jstrachan I would not make it such generic. In fact I though that the Kompose handler reads the kompose.yml by calling out to kompose which creates the yaml file in some temporary directory. Then the kompose handler itself picks up the YAMLs and creates the kubernetes model objects, which are then merged into the current list (after XML configuration setup, before enrichment process). |
I think setting it up like gofabric8 with fabric8:setup makes sense. We already have an OS detection (as gofabric8 is also a go binary which we download with fabric8:setup) |
Kompose is an awesome conversion tool which creates Kubernetes descriptor objects from Docker compose files.
The idea is to extend the
fabric8:resource
goal to support Docker compose files via an external CLI call tokompose
. This should be possible to be switched on either explicitly by a configuration option<composeFile>
in the XML configuration or maybe even implicitly by monitoring a directorysrc/main/fabric8-kompose
for the content of somedocker-compose.yml
files.The flow would be:
kompose
is called externally which creates Kubernetes resource descriptor yaml files in a build directory belowtarget/fabric8
. Configuration forkompose
comes from the plugin configuration.KubernetesList
is then used as starting point for the further processing:An alternative approach would be to re-implement kompose functionality in Java which would provide a better integration (no external tool is required) but is much more work.
@jstrachan @pradeepto wdyt ? Is this a feasible plan ? Or do you see a better integration point ?
The text was updated successfully, but these errors were encountered: