Cluster Info Template Variables
The platform cluster operator generates a cluster-info.json secret that contains cluster-specific configuration values. These values can be referenced in your Helm chart templates using the {{variable_name}} syntax, allowing for dynamic configuration that automatically adapts to wherever your application gets installed.
Basic Usage
In your installable CRD (and also in installation overrides), you can reference these variables in your Helm chart "template":
source:
chart: my-application
template: |
agent:
identifier: {{cluster.name}}
organization: {{cluster.organization}}
server:
endpoint: {{server}}
This template will inject those variables and be used as a values file when rendering the helm chart. This enables you to customize this installation when installing it across many clusters without having to make special per-cluster configuration if the platform already knows this information about your cluster.
Available Variables
Core Cluster Information
| Variable | Description | Example Value |
|---|---|---|
{{cluster.name}} | The name of the platform cluster | "my-cluster" |
{{cluster.uniqueName}} | Unique identifier for the cluster | "my-cluster-abc123" |
{{cluster.organization}} | The organization/namespace where the cluster is deployed | "my-org" |
DNS Configuration
| Variable | Description | Example Value |
|---|---|---|
{{dns.domainName}} | The cluster's domain name | "cluster.example.com" |
{{dns.cdnDomainName}} | CDN domain name for the cluster | "cdn.cluster.example.com" |
{{dns.cdnHostedZoneId}} | AWS CDN hosted zone ID (AWS clusters only) | "Z1234567890ABC" |
Orchestration Cluster
| Variable | Description | Example Value |
|---|---|---|
{{orchestrationCluster.domain}} | Domain of the orchestration cluster | "orchestration.example.com" |
Environment Configuration
| Variable | Description | Example Value |
|---|---|---|
{{environment.name}} | Environment name (dev, staging, prod, etc.) | "dev" |
{{environment.type}} | Environment type (same as name) | "dev" |
OIDC Configuration
| Variable | Description | Example Value |
|---|---|---|
{{oidc.issuer}} | OIDC issuer URL | "https://oidc.example.com" |
{{oidc.scopes}} | OIDC scopes | ["openid", "profile"] |
{{oidc.org}} | Organization ID for OIDC | "org123" |
Istio Configuration
| Variable | Description | Example Value |
|---|---|---|
{{istio.enabled}} | Whether Istio is enabled | true or false |
{{istio.defaultGateway}} | Default Istio gateway name | "default-gateway" |
Cloud Provider Information
| Variable | Description | Example Value |
|---|---|---|
{{cloud}} | Cloud provider type | "aws", "azure", or "vcluster" |
AWS-Specific Variables (EKS clusters only)
| Variable | Description | Example Value |
|---|---|---|
{{aws.region}} | AWS region | "us-east-1" |
{{aws.accountId}} | AWS account ID | "123456789012" |
{{aws.certificateArn}} | SSL certificate ARN | "arn:aws:acm:us-east-1:123456789012:certificate/abc123" |
{{aws.eksOidcIssuerUrl}} | EKS OIDC issuer URL | "https://oidc.eks.us-east-1.amazonaws.com/id/ABC123" |
{{aws.permissionBoundaryName}} | Permission boundary name | "MyPermissionBoundary" |
{{aws.albOidcAnnotation}} | ALB OIDC annotation | "arn:aws:iam::123456789012:oidc-provider/oidc.eks.us-east-1.amazonaws.com/id/ABC123" |
{{aws.wildcardCert}} | Wildcard certificate ARN | "arn:aws:acm:us-east-1:123456789012:certificate/abc123" |
Azure-Specific Variables (AKS clusters only)
| Variable | Description | Example Value |
|---|---|---|
{{azure.location}} | Azure region/location | "eastus" |
{{azure.subscriptionId}} | Azure subscription ID | "12345678-1234-1234-1234-123456789012" |
{{azure.resourceGroup}} | Azure resource group name | "my-resource-group" |
{{azure.storageAccountName}} | Storage account name | "mystorageaccount" |
{{azure.storageRedundancySku}} | Storage redundancy SKU | "Standard_LRS" |
{{azure.aksOidcIssuerUrl}} | AKS OIDC issuer URL | "https://token.actions.githubusercontent.com" |
{{azure.uniqueSuffix}} | Unique suffix for Azure resources | "a1b2c3d4" |
Kubernetes Server Information
| Variable | Description | Example Value |
|---|---|---|
{{server}} | Kubernetes API server endpoint | "https://api.cluster.example.com" |
Example Templates
Basic Application Configuration
source:
chart: my-app
template: |
app:
name: "{{cluster.name}}-app"
environment: "{{environment.name}}"
organization: "{{cluster.organization}}"
ingress:
host: "{{cluster.name}}.{{dns.domainName}}"
tls:
secretName: "{{cluster.name}}-tls"
config:
apiEndpoint: "{{server}}"
oidcIssuer: "{{oidc.issuer}}"
AWS-Specific Configuration
source:
chart: aws-app
template: |
aws:
region: "{{aws.region}}"
accountId: "{{aws.accountId}}"
certificateArn: "{{aws.certificateArn}}"
istio:
enabled: {{istio.enabled}}
gateway: "{{istio.defaultGateway}}"
Azure-Specific Configuration
source:
chart: azure-app
template: |
azure:
location: "{{azure.location}}"
subscriptionId: "{{azure.subscriptionId}}"
resourceGroup: "{{azure.resourceGroup}}"
storageAccount: "{{azure.storageAccountName}}"
oidc:
issuer: "{{azure.aksOidcIssuerUrl}}"
Cluster Type Availability
| Variable Group | EKS | AKS | vCluster |
|---|---|---|---|
cluster.* | ✅ | ✅ | ✅ |
dns.* | ✅ | ✅ | ✅ |
orchestrationCluster.* | ✅ | ✅ | ✅ |
environment.* | ✅ | ✅ | ✅ |
oidc.* | ✅ | ✅ | ✅ |
istio.* | ✅ | ✅ | ✅ |
aws.* | ✅ | ❌ | ❌ |
azure.* | ❌ | ✅ | ❌ |
server | ✅ | ✅ | ✅ |
Best Practices
- Always provide fallbacks: Use Helm's default values for critical configuration
- Validate required fields: Check that required variables are available for your cluster type
- Use conditional logic: Leverage Helm's
ifstatements to handle different cluster types - Test across environments: Verify your templates work with different cluster configurations
Troubleshooting
If a variable is not available or contains an empty value:
- Check that your cluster type supports the variable
- Verify the cluster configuration has the required fields populated
- Use Helm's
defaultfunction to provide fallback values:{{variable_name | default "fallback"}} - Check the cluster-info secret in the target namespace to see what values are actually available