https://github.com/inseefrlab/marathon-to-kubernetes
A small library to convert marathon JSON to kubernetes YML
https://github.com/inseefrlab/marathon-to-kubernetes
Last synced: 11 months ago
JSON representation
A small library to convert marathon JSON to kubernetes YML
- Host: GitHub
- URL: https://github.com/inseefrlab/marathon-to-kubernetes
- Owner: InseeFrLab
- License: mit
- Created: 2019-12-17T15:18:34.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-12-15T05:51:40.000Z (over 2 years ago)
- Last Synced: 2025-04-03T00:29:49.330Z (about 1 year ago)
- Language: Java
- Size: 49.8 KB
- Stars: 7
- Watchers: 4
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Marathon to Kubernetes
A small application that converts `marathon.json` contracts (used by [Marathon](https://github.com/mesosphere/marathon)) to `deployment.yml` files (used by [Kubernetes](https://kubernetes.io/).
Support is quite minimal and was primarily tailored for our internal use at [Insee](https://insee.fr/) but you may find it handy for your usage. Feel free to contribute, issues & pull requests are welcome !
[](https://travis-ci.org/inseefrlab/marathon-to-kubernetes) [](https://codeclimate.com/github/InseeFrLab/marathon-to-kubernetes/maintainability) [](https://coveralls.io/github/InseeFrLab/marathon-to-kubernetes?branch=master)
## Usage
### Using API
API can be run using either Java or Docker.
Java release is available in the [Github releases page](https://github.com/InseeFrLab/marathon-to-kubernetes/releases)
You can run the API using Java (version 11+ required) :
`java -jar marathon-to-kubernetes-web-version.jar`
Docker release is available at [Dockerhub](https://hub.docker.com/r/inseefrlab/marathon-to-kubernetes)
`docker run -p 8080:8080 inseefrlab/marathon-to-kubernetes`
API will then be accessible at
`http://localhost:8080/api/convert`
OpenAPI description is available at
`http://localhost:8080/api/`
### Including it in your Java project
The core `jar` is not (yet ?) available on maven central. For now you have to manually include it in your project.
The `jar` file can be downloaded from the [Github releases page](https://github.com/InseeFrLab/marathon-to-kubernetes/releases).
You can then install it locally or within your organisation :
```
mvn install:install-file -Dfile=./marathon-to-kubernetes-web-version.jar -DgroupId=fr.insee.innovation -DartifactId=marathon-to-kubernetes-core -Dversion=version -Dpackaging=jar
```
### Using CLI
CLI can be downloaded from the [Github releases page](https://github.com/InseeFrLab/marathon-to-kubernetes/releases)
You can run the converter using Java (version 11+ required) :
`java -jar marathon-to-kubernetes-cli-version.jar [-n=] [-o=] `
### Usage roadmap
In the future we intend to create a small web app with a JSON Editor (contributions welcome !)
## Compatibility
| Feature | Status | Comment |
| --------------- | ----------- | --------------------------------------------------------------------------------- |
| Single app | ✅ | |
| Multiple apps | ✅ | |
| Group | ⌛ | Need to decide how to properly map Marathon group to kubernetes pods / containers |
| Instances | ✅ | |
| CPU / Mem | ✅ | Resources are defined as "resources requests" not limits |
| PORT_MAPPINGS | ✅ | |
| Env | ✅ | |
| HAPROXY_X_VHOST | ✅ | |
| Fetch | ⌛ | |
| Healthcheck | ✅ | |