question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add Kompose support

See original GitHub issue

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 to kompose. 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 directory src/main/fabric8-kompose for the content of some docker-compose.yml files.

The flow would be:

  • If enabled and present, kompose is called externally which creates Kubernetes resource descriptor yaml files in a build directory below target/fabric8. Configuration for kompose comes from the plugin configuration.
  • These descriptors are read in by f-m-p via the kubernetes client
  • The so instantiated KubernetesList is then used as starting point for the further processing:
    • Additional fragments can be added
    • Information of the XML configuration can add to this list
    • The enricher chain is fed with this list so that it can be enriched as usual.

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 ?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
jstrachancommented, Jul 12, 2017

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 target/fabric8-generated?

1reaction
jstrachancommented, Jul 6, 2017

@hrishin a few thoughts:

  1. yes the enrichers should kick in unless the user disables them

  2. Check the $PATH and fail if its not there? It might be worth running kompose -v or whatever to find the version and failing the build if the version number is too old?

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 mvn fabric8:setup?

Read more comments on GitHub >

github_iconTop Results From Across the Web

User Guide - Kompose
Kompose supports conversion of V1, V2, and V3 Docker Compose files into Kubernetes and OpenShift objects. Kubernetes. $ kompose --file docker-voting.yml convert ...
Read more >
Add Support for docker-compose 3.4 · Issue #1125 - GitHub
I have check the latest code , we have support 3.4/3.5 now. Which versions of kompose you guys use?
Read more >
Translate a Docker Compose File to Kubernetes Resources
Kompose supports conversion of V1, V2, and V3 Docker Compose files into Kubernetes and OpenShift objects. Kubernetes kompose convert example.
Read more >
Kompose - Docker-Compose to Kubernetes with ease!
Using the kompose convert , the following files are created. INFO Kubernetes file "redis-service.yaml" created INFO Kubernetes file "web-service ...
Read more >
Quick start | Jetpack Compose - Android Developers
If you want to start a new project that includes support for Compose by default, ... Add the following definition to your app's...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found