Skip to content
Commodore is a wrapper around Kapitan which allows compiling a Kapitan inventory from multiple Git repositories
Python Makefile Shell Jsonnet Dockerfile
Branch: master
Clone or download

Latest commit

tobru Merge pull request #62 from projectsyn/init-catalog-repo
Create initial commit in cloned repositories if no commits exist
Latest commit e62929a Mar 16, 2020


Type Name Latest commit message Commit time
Failed to load latest commit information.
.github/workflows Ensure Commodore binary version is set when pushing image Mar 9, 2020
component-template Implement separation of component defaults and hierarchy values Dec 16, 2019
docs Updated UI bundle Feb 4, 2020
filters Implement new filter argument for helm_namespace Nov 5, 2019
lib Implement new filter argument for helm_namespace Nov 5, 2019
tests Fix ApiError exception message handling Mar 3, 2020
tools Update golang Docker tag to v1.14 Feb 26, 2020
.dockerignore Add python cruft to .dockerignore Feb 14, 2020
.gitignore Adapted documentation to support Antora Dec 18, 2019 Update CHANGELOG Mar 11, 2020 add LICENSE and contribution guidelines Dec 17, 2019
Dockerfile Merge pull request #45 from projectsyn/renovate/… Feb 28, 2020
LICENSE add LICENSE and contribution guidelines Dec 17, 2019
Makefile Add make targets to lint and test the code and to build Docker image Feb 14, 2020
Pipfile Improve bulk dependency update Feb 14, 2020
Pipfile.lock Bulk update python dependencies Mar 13, 2020 Update README and add CHANGELOG Feb 14, 2020
playbook.yml Updated UI bundle version Feb 6, 2020
renovate.json Enable pipenv support in Renovate Feb 14, 2020 Bulk-update dependencies Feb 14, 2020
requirements.txt Update dependency google-auth to v1.11.2 Feb 14, 2020 Add test infrastructure Nov 26, 2019
tox.ini Improve bulk dependency update Feb 14, 2020 Add make targets to lint and test the code and to build Docker image Feb 14, 2020

Project Syn: Commodore

Please note that this project is in its early stages and under active development.

See for changelogs of each release version of Commodore.

See DockerHub for pre-built Docker images of Commodore.


Commodore provides opinionated tenant-aware management of Kapitan inventories and templates. Commodore uses Kapitan for the heavy lifting of rendering templates and resolving a hierachical configuration structure.

Commodore introduces the concept of a component, which is a bundle of Kapitan templates and associated Kapitan classes which describe how to render the templates. Commodore fetches any components that are required for a given configuration before running Kapitan, and sets up symlinks so Kapitan can find the component classes.

Commodore also supports additional processing on the output of Kapitan, such as patching in the desired namespace for a Helm chart which has been rendered using helm template.

System Requirements

Getting started

  1. Install requirements

    Install pipenv according to the upstream documentation.

    Create the Commdore pip environment:

    pipenv install --dev

    Build the Kapitan helm binding:

    • Linux:

      pipenv run build_kapitan_helm_binding
    • OS X:

      Note: At the moment you'll need a working Go compiler to build the Kapitan Helm bindings on OS X.

      pipenv run sh -c '${VIRTUAL_ENV}/lib/python3.*/site-packages/kapitan/inputs/helm/'
  2. Setup a .env file to configure Commodore (or provide command line flags):

    # URL of Lieutenant API
    # Lieutenant API token
    # Base URL for global Git repositories
    # Base URL for customer Git repositories

    For Commodore to work, you need to run an instance of the Lieutenant API somewhere (locally is fine too).

    Commodore component repositories must exist in ${COMMODORE_GLOBAL_GIT_BASE}/commodore_components/ with the repository named identically to the component name.

    Note: Commodore currently only supports fetching remote Git repositories via SSH.

  3. Run Commodore

    pipenv run commodore
  4. Start hacking on Commodore

    pipenv shell
    • Write a line of test code, make the test fail
    • Write a line of application code, make the test pass
    • Repeat
  5. Run linting and tests

    Auto format with autopep8

    pipenv run autopep

    List all Tox targets:

    pipenv run test tox -lv

    Run all linting and tests:

    pipenv run test tox

    Run just a specific target:

    pipenv run test tox -e py38

    Upgrade dependencies (Pipfile.lock, requirements.txt)

    pipenv run test tox -e requirements

Run Commodore in Docker

  1. Build the Docker image inside of the cloned Commodore repository:
docker build -t commodore .
  1. Run the built image:
docker run -it --rm \
    -e COMMODORE_API_TOKEN="..." \
    -e SSH_PRIVATE_KEY="$(cat ~/.ssh/id_ed25519)" \
    -v $(pwd)/catalog:/app/catalog/ \
    -v $(pwd)/dependencies:/app/dependencies/ \
    -v $(pwd)/inventory:/app/inventory/ \
    --entrypoint bash \
  1. Set up ssh-agent in the running Docker container for the access to Git repositories:
eval $(ssh-agent)
ssh-add .identityfile
  1. Run Commodore inside of the running Docker container:
pipenv run commodore


Run the make docs command in the docs subfolder to generate the Antora documentation website locally. The website will be available at the _antora/index.html file.

After writing the documentation, please use the make check command and correct any warnings raised by the tool.

You can’t perform that action at this time.