Skip to content

System Variables

Omnistrate allows your deployments to be modified at runtime through contextual information provided by the platform through system variables. System variables are placeholders that are replaced with actual values at runtime. You can use system variables in various places in your Helm charts, Kubernetes Operators, Container configurations, Kustomize templates, Terraform templates, etc.

Example of information provided through system variables (not exhaustive):

  • Cloud Provider
  • Region
  • Kubernetes Cluster ID
  • Tenant ID
  • VPC ID / Network ID
  • Subnet ID

Usage

System variables are used in the following format: $sys.<variable-name>. For example, $sys.deploymentCell.region.

Info

All variables are substituted with their original data type. If you want to use a variable as a string, you need to wrap it in escaped quotes. For example, \"$sys.deploymentCell.region\". This is particularly critical for Helm Chart values that need a specific data type to be preserved / passed to the Helm Chart.

Supported System Variables

You can use the following JSON schema in IDEs that use the YAML Language Server (eg: VSCode / NeoVim).

# yaml-language-server: $schema=https://gist.githubusercontent.com/aloknnikhil/f0d4b01287cbc2186d095c1b469bfb61/raw/386623cc12954b6b6a94d7dc03d8d3321f1a0ea0/omnistrate-system-parameters-schema.json

This gives you an exhaustive list of all supported system variables today. Please make sure to follow the syntax above to use it by prepending $sys. to the variable name.

Parameters VSCode