# Commodore-managed inventory parameters

This page provides a reference for all inventory parameters which are injected into the hierarchy by Commodore. The parameters are injected using the class `params.cluster`. This class is created by Commodore in file `inventory/classes/params/cluster.yml`.

The class is included in each Kapitan target with the lowest precedence of all classes.

## Global parameters

### `cluster`

The key `cluster` holds the following information about the cluster and its tenant:

`name`

The cluster’s ID (the name of the cluster object managed by Lieutenant).

`display_name`

The cluster’s display name.

`tenant`

The ID of the cluster’s tenant.

`tenant_display_name`

The display name of the cluster’s tenant.

`catalog_url`

The cluster catalog Git repository URL.

### `facts`

The cluster’s static facts, as stored in the cluster’s Lieutenant object.

The following facts are mandatory:

`cloud`

The cloud provider on which the cluster is installed.

`region`

The cloud region on which the cluster is installed. Mandatory only for clouds which have multiple regions.

`distribution`

The Kubernetes distribution of the cluster.

### `dynamic_facts`

The cluster’s dynamic facts as reported by Steward on the cluster.

There are currently no mandatory dynamic facts.

Components shouldn’t directly consume dynamic facts. Instead, components should expose a parameter which can be configured with a dynamic fact if information from dynamic facts should be used in a component. This minimizes the coupling between components and the presence of dynamic facts, and allows components to degrade gracefully when a dynamic fact is missing for a Project Syn installation.

This could look something like

Component `defaults.yml`
``````parameters:
component_name:
kubernetes_version: '1.20' (1)``````
 1 The component defaults to K8s version 1.20 when the parameter isn’t overwritten in the configuration hierarchy
Project Syn global configuration repository
``````parameters:
component_name:
kubernetes_version: '${dynamic_facts:kubernetesVersion:major}.${dynamic_facts:kubernetesVersion:minor}' (1)``````
 1 The parameter is overwritten using dynamic facts in the Project Syn installation’s global configuration repository.

## Component-specific parameters

Commodore adds some "meta-parameters" to each component’s Kapitan target. These are provided to simplify component configurations.

Commodore provides the following component-specific top-level parameters

### `_base_directory`

This parameter provides the absolute path to the component’s base directory. This parameter is intended for component authors to use in `kapitan.compile` and `kapitan.dependencies` entries when referencing files in the component directory.

### `_kustomize_wrapper`

This parameter provides the absolute path to the Kustomize wrapper script bundled with Commodore. This parameter is intended for component authors to use to call Kustomize in components. See the Kustomization best practices for more details.