Skip to main content

Substitution variables

Overview​

When NKP deploys a catalog application, it fills in a set of variables on the Flux Kustomization's spec.postBuild.substitute. Reference them in your manifests as ${variable} instead of hardcoding values, and Flux replaces them at deploy time.

Available variables​

Each variable becomes available in the NKP version noted below and remains available in all later versions.

VariableIntroduced in NKPAvailabilityDescription
releaseName2.16AlwaysThe deployment's release name: the AppDeployment's release-name annotation if set, otherwise its metadata.name.
releaseNamespace2.16AlwaysThe namespace the application is deployed into: the workspace namespace for workspace deployments, or the project namespace for project deployments.
workspaceNamespace2.16AlwaysThe workspace's namespace.
appName2.17AlwaysThe catalog application's ID, derived from its applications/<app-name> directory (e.g. jupyterhub).
appVersion2.17AlwaysThe catalog application's version, derived from its applications/<app-name>/<version> directory (e.g. 4.3.2).
projectNamespace2.17Project deployments onlyThe project's namespace.
clusterName2.19AlwaysThe name of the target cluster (the KommanderCluster's name).
workspaceName2.19When the target namespace resolves to a workspace or projectThe name of the Workspace the deployment belongs to (for a project deployment, its parent workspace).
projectName2.19Project deployments onlyThe name of the project the deployment belongs to.
clusterUUID2.19When the kommander.mesosphere.io/cluster-id label is setThe target cluster's ID, taken from that label on the KommanderCluster.
clusterType2.19When a value is availableThe target cluster's type, resolved in precedence order: (1) for CAPI-managed clusters, the referenced CAPI Cluster's spec.infrastructureRef.kind (for example NutanixCluster, AWSCluster, AzureCluster, DockerCluster); (2) for non-CAPI clusters, the kommander.mesosphere.io/cluster-type label, one of EKS, GKE, AKS, Unknown.