Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions docs/envgene-objects.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
- [Environment Credentials File](#environment-credentials-file)
- [Shared Credentials File](#shared-credentials-file)
- [System Credentials File (in Instance repository)](#system-credentials-file-in-instance-repository)
- [Shared Template Variable Files](#shared-template-variable-files)
- [Environment Specific ParameterSet](#environment-specific-parameterset)
- [Environment Specific Resource Profile Override](#environment-specific-resource-profile-override)
- [Cloud Passport](#cloud-passport)
Expand Down Expand Up @@ -1134,6 +1135,40 @@ gitlab-token-cred:
secret: "token-placeholder-123"
```

### Shared Template Variable Files

This file includes template variables that can be shared across multiple environments. During Environment Instance generation, EnvGene automatically merges variables from these shared files with `additionalTemplateVariables` from the [Environment Inventory](/docs/envgene-configs.md#env_definitionyml).

The relationship between Shared Template Variable Files and Environment is established through:

- The `envTemplate.sharedTemplateVariables` property in [Environment Inventory](/docs/envgene-configs.md#env_definitionyml)
- The property value should be the filename (without extension) of the Shared Template Variable File

Files can be defined at three scopes with different precedence:

1. **Environment-level**
**Location:** `/environments/<cluster-name>/<environment-name>/shared-template-variables/`
2. **Cluster-level**
**Location:** `/environments/<cluster-name>/shared-template-variables/`
3. **Site-level**
**Location:** `/environments/shared-template-variables/`

EnvGene checks these locations in order (environment → cluster → site) and uses the first matching file found.

The file must contain a key-value hashmap and must NOT be located in a `parameters` directory.

During Environment Instance generation, variables from Shared Template Variable Files are merged with `additionalTemplateVariables` from the Environment Inventory. Variables from `additionalTemplateVariables` take precedence over variables from Shared Template Variable Files if there are conflicts.

**Example:**

```yaml
TEMPLATE_VARIABLE_1: "value-1"
TEMPLATE_VARIABLE_2: "value-2"
nested:
key1: "nested-value-1"
key2: "nested-value-2"
```

### Environment Specific ParameterSet

TBD
Expand Down
Loading