Open yangcao77 opened 1 year ago
blocked by #1120
Investigating Kompose repository to import package for use. Adopted new schema + created flag in the parsing module. Working on convertor utils function to build kubernetes files on disk.
Potential blocker for this issue: https://github.com/kubernetes/kompose/issues/464
In the next release of Kompose 1.29.0, there will be in built support to convert docker compose files into kubernetes objects. Presently, using select kompose library functions for conversion.
Finished conversion of Docker-Compose to Kube representation, and further conversion to a Kube component. Currently testing for each case (uri + url + inline). Next step will be applying some commands to the components and clean up before a PR.
Create a draft PR detailing the tasks finished and the tasks to be completed next.
things left to be done:
devfileObj.writeYaml
Which area this feature is related to?
/area library
Which functionality do you think we should add?
Why is this needed? Is your feature request related to a problem?
Detailed description:
The docker-compose file is only relying on containers that are already built and available in the container catalog (docker-compose not relying on dockerfiles). We should be able to use the docker-compose file and use its services as components for the devfile.
Targets: We would need to formalize an improvement to the specification, so that it is possible to link devfile components from the docker-compose file - so it'll not be a "conversion" of the docker-compose file to devfile, but a way to use the docker-compose and the devfile together.
Implementation:
Directly use Kompose and convert to a kubernetes component in devfile. Document the limitation of the conversion. (will be from Kompose tool)
Add a way to refer to a docker-compose file from the devfile, e.g. a docker-compose component element. (should be similar to image component, with a uri reference) Update the parsing model in the devfile library with a flag, for devfiles with the docker-compose component, convert the docker-compose component to other existing components using the library above, e.g. kubernetes components, and replace the docker-compose component with those generated components
Describe alternatives you've considered
1) Podman: Limited documentation + only available for CLI. 2) Parsing the inputs, building an intermediate representation, output the desired files: No documentation available + better considered for supporting new container implementation.
Additional context