{"id":14155236,"url":"https://github.com/metal3d/katenary","last_synced_at":"2025-04-04T16:11:27.778Z","repository":{"id":37707201,"uuid":"460349991","full_name":"metal3d/katenary","owner":"metal3d","description":"Convert docker and podamn compose to a configurable helm chart","archived":false,"fork":false,"pushed_at":"2025-03-12T22:43:07.000Z","size":1129,"stargazers_count":175,"open_issues_count":10,"forks_count":13,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-03-28T15:04:17.212Z","etag":null,"topics":["compose","docker","docker-compose","helm","helm-chart","kubernetes","podman"],"latest_commit_sha":null,"homepage":"https://katenary.org","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/metal3d.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-02-17T08:41:58.000Z","updated_at":"2025-03-24T12:12:15.000Z","dependencies_parsed_at":"2024-10-24T19:43:12.470Z","dependency_job_id":"fd153831-d670-4a90-98af-ee5d1f6ac223","html_url":"https://github.com/metal3d/katenary","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metal3d%2Fkatenary","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metal3d%2Fkatenary/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metal3d%2Fkatenary/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metal3d%2Fkatenary/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/metal3d","download_url":"https://codeload.github.com/metal3d/katenary/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247208142,"owners_count":20901570,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["compose","docker","docker-compose","helm","helm-chart","kubernetes","podman"],"created_at":"2024-08-17T08:02:34.296Z","updated_at":"2025-04-04T16:11:27.768Z","avatar_url":"https://github.com/metal3d.png","language":"Go","funding_links":[],"categories":["kubernetes"],"sub_categories":[],"readme":"\u003cdiv style=\"text-align:center; margin: auto 0 4em 0\" align=\"center\"\u003e\n\u003cimg src=\"./doc/docs/statics/logo-vertical.svg\" alt=\"Katenary Logo\" style=\"max-width: 90%\" align=\"center\"/\u003e\n\u003c/div\u003e\n\n\u003cdiv style=\"text-align:center; margin: auto 0 4em 0\" align=\"center\"\u003e\n\n[![Documentation Status](https://readthedocs.org/projects/katenary/badge/?version=latest)](https://katenary.readthedocs.io/en/latest/?badge=latest)\n[![Go Report Card](https://goreportcard.com/badge/github.com/metal3d/katenary)](https://goreportcard.com/report/github.com/metal3d/katenary)\n[![GitHub release](https://img.shields.io/github/v/release/metal3d/katenary)](https://github.com/metal3d/katenary/releases)\n[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=metal3d_katenary\u0026metric=coverage)](https://sonarcloud.io/summary/new_code?id=metal3d_katenary)\n[![Vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=metal3d_katenary\u0026metric=vulnerabilities)](https://sonarcloud.io/summary/new_code?id=metal3d_katenary)\n[![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=metal3d_katenary\u0026metric=security_rating)](https://sonarcloud.io/summary/new_code?id=metal3d_katenary)\n\n[![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=metal3d_katenary\u0026metric=sqale_rating)](https://sonarcloud.io/summary/new_code?id=metal3d_katenary)\n\n\u003c/div\u003e\n\n\u003cdiv style=\"text-align:center; margin: auto 0 4em 0\" align=\"center\"\u003e\n\u003ch3\u003e🚀 Unleash Productivity with Katenary! 🚀\u003c/h3\u003e\n\u003c/div\u003e\n\nTired of manual conversions? Katenary harnesses the labels from your \"`compose`\" file to craft complete Helm Charts\neffortlessly, saving you time and energy.\n\n🛠️ Simple automated CLI: Katenary handles the grunt work, generating everything needed for seamless service binding\nand Helm Chart creation.\n\n💡 Effortless Efficiency: You only need to add labels when it's necessary to precise things.\nThen call `katenary convert` and let the magic happen.\n\n## What ?\n\nKatenary is a tool to help to transform `compose` (`docker compose`, `podman compose`, `nerdctl compose`, ...) files\nto a working Helm Chart for Kubernetes.\n\nToday, it's partially developed in collaboration with [Klee Group](https://www.kleegroup.com). Note that Katenary is\nand **will stay an open source and free (as freedom) project**. We are convinced that the best way to make it better is to\nshare it with the community.\n\nThe main developer is [Patrice FERLET](https://github.com/metal3d).\n\n## Install\n\nYou can download the binaries from the [Release](https://github.com/metal3d/katenary/releases) section. Copy the binary\nand rename it to `katenary`. Place the binary inside your `PATH`. You should now be able to call the `katenary` command.\n\nYou can of course get the binary with `go install -u github.com/metal3d/katenary/cmd/katenary/...` but the `main` branch\nis continuously updated. It's preferable to use releases.\n\nYou can use this commands on Linux:\n\n```bash\nsh \u003c(curl -sSL https://raw.githubusercontent.com/metal3d/katenary/master/install.sh)\n```\n\n## Or, build yourself\n\nIf you've got `podman` or `docker`, you can build `katenary` by using:\n\n```bash\nmake build\n```\n\nYou can then install it with:\n\n```bash\nmake install\n```\n\nIt will use the default PREFIX (`~/.local/`) to install the binary in the `bin` subdirectory. You can force the PREFIX\nvalue at install time, but maybe you need to use \"sudo\":\n\n```bash\nsudo make install PREFIX=/usr/local\n```\n\nIf that goes wrong, you can use your local Go compiler:\n\n```bash\nmake build GO=local\n\n# To force OS or architecture\nmake build GO=local GOOS=linux GOARCH=arm64\n```\n\nThen place the `katenary` binary file inside your PATH.\n\n## Tips\n\nWe strongly recommend adding the completion call to you SHELL using the common `bashrc`, or whatever the profile file\nyou use.\n\nE.g.,\n\n```bash\n# bash in ~/.bashrc file\nsource \u003c(katenary completion bash)\n# if the documentation breaks a bit your completion:\nsource \u003c(katenary completion bash --no-description)\n\n# zsh in ~/.zshrc\nsource \u003c(katenary completion zsh)\n\n# fish in ~/.config/fish/config.fish\nkatenary completion fish | source\n\n# experimental\n# powershell (as we don't provide any support on Windows yet, please avoid this...)\n```\n\n## Usage\n\n```text\nKatenary is a tool to convert compose files to Helm Charts.\n\nEach [command] and subcommand has got an \"help\" and \"--help\" flag to show more information.\n\nUsage:\n  katenary [command]\n\nExamples:\n  katenary convert -c docker-compose.yml -o ./charts\n\nAvailable Commands:\n  completion        Generates completion scripts\n  convert           Converts a docker-compose file to a Helm Chart\n  hash-composefiles Print the hash of the composefiles\n  help              Help about any command\n  help-labels       Print the labels help for all or a specific label\n  schema            Print the schema of the katenary file\n  version           Print the version number of Katenary\n\nFlags:\n  -h, --help      help for katenary\n  -v, --version   version for katenary\n\nUse \"katenary [command] --help\" for more information about a command.\n```\n\n  Katenary will try to find a `docker-compose.yaml` or `docker-compose.yml` file inside the current directory. It will\n  check *the existence of the `chart` directory to create a new Helm Chart inside a named subdirectory. Katenary will ask\n  you if you want to delete it before recreating.\n\nIt creates a subdirectory inside `chart` that is named with the `appname` option (default is `MyApp`)\n\n  \u003e To respect the ability to install the same application in the same namespace, Katenary will create variable names\n  \u003e like `{{ .Release.Name }}-servicename`. So, you will need to use some labels inside your docker-compose file to help\n  \u003e Katenary to build a correct helm chart.\n\n  Example of a possible `docker-compose.yaml` file:\n\n```yaml\nservices:\n  webapp:\n    image: php:7-apache\n    environment:\n      # note that \"database\" is a \"compose\" service name\n      # so we need to adapt it with the map-env label\n      DB_HOST: database\n      # a pitty to repeat this values, isn't it?\n      # so, let's change them with \"values-from\" label\n      DB_USER: foo\n      DB_PASSWORD: bar\n    expose:\n      - 80\n    depends_on:\n      # this will create a init container waiting for 3306 port\n      # because it's the \"exposed\" port\n      - database\n    labels:\n      # expose the port 80 as an ingress\n      katenary.v3/ingress: |-\n        hostname: myapp.example.com\n        port: 80\n      # make adaptations, DB_HOST environment is actually the service name\n      katenary.v3/map-env: |-\n        DB_HOST: '{{ .Release.Name }}-database'\n      # get the values from the \"database\" service\n      # this will use the database secrets and environment,\n      # see the \"database\" service to see the values\n      katenary.v3/values-from: |-\n        DB_USER: database.MARIADB_USER\n        DB_PASSWORD: database.MARIADB_PASSWORD\n\n  database:\n    image: mariadb:10\n    env_file:\n      # this valuse will be added in a configMap\n      - my_env.env\n    environment:\n      MARIADB_USER: foo\n      MARIADB_ROOT_PASSWORD: foobar\n      MARIADB_PASSWORD: bar\n    labels:\n      # no need to declare this port in docker-compose\n      # but katenary will need it\n      katenary.v3/ports: |-\n        - 3306\n      # these variables are secrets\n      katenary.v3/secrets: |-\n        - MARIADB_ROOT_PASSWORD\n        - MARIADB_PASSWORD\n```\n\n## Labels\n\nThese labels could be found by `katenary help-labels`, and can be placed as labels inside your docker-compose file:\n\n```text\nTo get more information about a label, use `katenary help-label \u003cname_without_prefix\u003e\ne.g. katenary help-label dependencies\n\nkatenary.v3/configmap-files:\tlist of strings\t\tAdd files to the configmap.\nkatenary.v3/cronjob:\t\tobject\t\t\tCreate a cronjob from the service.\nkatenary.v3/dependencies:\tlist of objects\t\tAdd Helm dependencies to the service.\nkatenary.v3/description:\tstring\t\t\tDescription of the service\nkatenary.v3/env-from:\t\tlist of strings\t\tAdd environment variables from antoher service.\nkatenary.v3/exchange-volumes:\tlist of objects\t\tAdd exchange volumes (empty directory on the node) to share data\nkatenary.v3/health-check:\tobject\t\t\tHealth check to be added to the deployment.\nkatenary.v3/ignore:\t\tbool\t\t\tIgnore the service\nkatenary.v3/ingress:\t\tobject\t\t\tIngress rules to be added to the service.\nkatenary.v3/main-app:\t\tbool\t\t\tMark the service as the main app.\nkatenary.v3/map-env:\t\tobject\t\t\tMap env vars from the service to the deployment.\nkatenary.v3/ports:\t\tlist of uint32\t\tPorts to be added to the service.\nkatenary.v3/same-pod:\t\tstring\t\t\tMove the same-pod deployment to the target deployment.\nkatenary.v3/secrets:\t\tlist of string\t\tEnv vars to be set as secrets.\nkatenary.v3/values:\t\tlist of string or map\tEnvironment variables to be added to the values.yaml\nkatenary.v3/values-from:\tmap[string]string\tAdd values from another service.\n```\n\n## Katenary.yaml file and schema validation\n\nInstead of using labels inside the docker-compose file, you can use a `katenary.yaml` file to define the labels. This\nfile is simpler to read and maintain, but you need to keep it up-to-date with the docker-compose file.\n\nFor example, instead of using this:\n\n```yaml\nservices:\n  web:\n    image: nginx:latest\n    katenary.v3/ingress: |-\n      hostname: myapp.example.com\n      port: 80\n```\n\nYou can remove the labels, and use a kanetary.yaml file:\n\n```yaml\nweb:\n  ingress:\n    hostname: myapp.example.com\n    port: 80\n```\n\nTo validate the `katenary.yaml` file, you can use the JSON schema using the \"master\" raw content:\n\n`https://raw.githubusercontent.com/metal3d/katenary/refs/heads/master/katenary.json`\n\nIt's easy to configure in [LazyVim](https://www.lazyvim.org/), using `nvim-lspconfig`,\ncreate a Lua file in your `plugins` directory, or apply the settings as the example below:\n\n```lua\n-- yaml.lua\n\nreturn {\n  {\n    \"neovim/nvim-lspconfig\",\n    opts = {\n      servers = {\n        yamlls = {\n          settings = {\n            yaml = {\n              schemas = {\n                [\"https://raw.githubusercontent.com/metal3d/katenary/master/katenary.json\"] = \"katenary.yaml\",\n              },\n            },\n          },\n        },\n      },\n    },\n  },\n}\n```\n\nUse this address to validate the `katenary.yaml` file in VSCode:\n\n```json\n{\n  \"yaml.schemas\": {\n    \"https://raw.githubusercontent.com/metal3d/katenary/master/katenary.json\": \"katenary.yaml\"\n  }\n}\n```\n\n\u003e You can, of course, replace the `master` with a specific tag or branch.\n\n## What a name…\n\nKatenary is the stylized name of the project that comes from the \"catenary\" word.\n\nA catenary is a curve formed by a wire, rope, or chain hanging freely from two points that are not in the same vertical\nline. For example, the anchor chain between a boat and the anchor.\n\nThis curved link represents what we try to do, the project is a stretched link from docker-compose to helm chart.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmetal3d%2Fkatenary","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmetal3d%2Fkatenary","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmetal3d%2Fkatenary/lists"}