As a Kubernetes-based container service platform, LDC Hybrid Cloud (LHC) injects a series of platform-related environment variables into containers by default. In this way, applications deployed by using LHC can conveniently obtain basic information by using the environment variables. The following table describes the environment variables injected by the platform.
System environment variables are read-only and cannot be modified.
Environment variable | Description | Example |
CAFE_ENV_TENANT_NAME | The tenant name. | ANTCLOUD |
CAFE_ENV_APPNAME | The application name. | transform |
CAFE_ENV_DC_NAME | The IDC name. | cn-hangzhou |
CAFE_ENV_REGION_NAME | The region name. | cn-hangzhou-finance |
CAFE_ENV_CELL_NAME | The cell name. | CellA/RZ01A (LDC architecture) |
CAFE_ENV_WSG_NAME | The workspace group name. | dev |
CAFE_ENV_WS_NAME | The LDC workspace name. | dev |
CAFE_ENV_POD_NAME | The pod name. | transform-01 |
CAFE_ENV_POD_NAMESPACE | The namespace to which the pod belongs. | default |
CAFE_ENV_POD_IP | The IP address of the pod. | 127.0.0.1 |
CAFE_ENV_HOST_NAME | The name of the host to which the pod belongs. | node01 |
CAFE_ENV_HOST_IP | The IP address of the host to which the pod belongs. | 127.0.0.1 |
app.env.zmode | Indicates whether the application is in LDC mode (middleware dependency). | true or false |
app.env.dbmode | The database mode (middleware dependency). | test, pre, or prod |