Environment Variables

Environment Variable Properties describes properties for creating deployment environment variables.

Table 1. Environment Variable Properties
Property Description
application.configuration.env[x].name The name of the environment variable.
application.configuration.env[x].value The value of the environment variable. Only use this property if application.configuration.env[x].valueFrom is not set.
application.configuration.env[x].valueFrom The valueFrom structure referencing elsewhere in the configuration for the value of the environment variable. Only use this property if application.configuration.env[x].value is not set.

The following shows an example configuration of two environment variables, one with a direct value and the other with a value referenced from the metadata.namespace property.

chf:
  configuration:
    env:
      - name: "MTX_CUSTOM_ENV_VAR"
        value: "some_value"
      - name: "MTX_CURRENT_NAMESPACE"
        valueFrom:
          fieldRef:
            fieldPath: metadata.namespace