Commands
Catalog Compile
commodore catalog compile CLUSTER
This command compiles a cluster catalog. This is the main mode of operation for Commodore when managing clusters.
This command will first collect all required components and hierachical configuration and prepare the inventory for Kapitan.
Then, the command will process the compiled inventory, and create secret
references in catalog/refs/
for any secret references it finds in the
inventory.
After the inventory and all references are in place, Kapitan is called to render the templates as specified by the compiled inventory.
After Kapitan has rendered all templates, any defined postprocessing filters
are applied to the output of Kapitan, before the fully processed manifests are
copied into the cluster catalog at catalog/manifests/
.
Catalog Clean
commodore catalog clean
This command deletes all the data which is managed by Commodore, listed below.
-
the downloaded and potentially modified catalog in
catalog/
-
all the downloaded and potentially modified components in
dependencies/
-
the generated inventory in
inventory/
-
Kapitan’s output in
compiled/
This command doesn’t check whether any local modifications exist and doesn’t check with the user whether they really want to remove the items listed above.
Component New
commodore component new SLUG
This command creates a new component repository under dependencies/
in Commodore’s working directory.
The component repository is created using a Cookiecutter template which provides a skeleton for writing a new component.
The command requires the argument SLUG
to match the regular expression ^[a-z][a-z0-9-]+[a-z0-9]$
.
Optionally, the template can be used to add a component library and postprocessing filter configuration.
The command expects to run in a directory which already holds a Commodore directory structure.
The command makes sure to create symlinks for the new component’s classes and creates a new Kapitan target for the component.
The command also adds the new component as a dependency in jsonnetfile.json
and runs jsonnet-bundler to symlink the new component into vendor/
.
The template also provides many meta-files in the component repository, such as the readme and changelog, standardized license, contributing and code of conduct files, a documentation template, and GitHub issue templates and actions configuration.
Component Delete
commodore component delete COMPONENT_NAME
This command removes a component directory from under dependencies/
in Commodore’s working directory.
The command will require confirmation before performing destructive operations, unless it’s passed the --force
option.
The command expects to run in a directory which already holds a Commodore directory structure.
The command makes sure to remove symlinks for the new component’s classes and deletes the Kapitan target for the component.
The command also removes the deleted component as a dependency in jsonnetfile.json
and runs jsonnet-bundler to remove the symlink to the deleted component in vendor/
.
Component Compile
commodore component compile PATH
This command compiles a single component.
This is the main mode of operation for developing new components, as it allows fast iteration while working on a component.
This command will create a fake inventory which mocks out all the infrastructure which a component would expect to be available when it’s included in a cluster’s configuration.
The command takes so called values files which provide custom configuration values for any configuration that could be provided from the hierarchical configuration repositories.