Configure Labels and Annotations
This section documents the configuration of labels and annotations for different DX Compose resources.
Annotations
Services and Pods
To configure annotations for Kubernetes services and pods, update your custom-values.yaml file as follows:
Notes:
- Additional annotations are not mandatory for a deployment.
- Ensure you do not overwrite existing DX Compose annotations such as the following:
meta.helm.sh/release-namemeta.helm.sh/release-namespace
Sample annotations for WebEngine service
To set annotation KEY1 with value VALUE1 and annotation KEY2 with value VALUE2 on the WebEngine service, add the following to your custom-values.yaml file:
annotations:
service:
webEngine:
- key: KEY1
value: VALUE1
- key: KEY2
value: VALUE2
Sample annotations for WebEngine pods
To set annotation KEY1 with value VALUE1 and annotation KEY2 with value VALUE2 on WebEngine pods, add the following to your custom-values.yaml file:
annotations:
pod:
webEngine:
- key: KEY1
value: VALUE1
- key: KEY2
value: VALUE2
Labels
Services and Pods**
To configure labels for Kubernetes services and pods, update your custom-values.yaml file as follows:
Notes:
- Additional labels are not mandatory for a deployment.
- Ensure that you do not overwrite existing DX Compose Labels such as the following:
releasehelm.sh/chartapp.kubernetes.io/versionapp.kubernetes.io/managed-byapp.kubernetes.io/nameapp.kubernetes.io/instance
Sample labels for WebEngine services
To set label KEY1 with value VALUE1 and label KEY2 with value VALUE2 on the WebEngine services, add the following to your custom-values.yaml file:
labels:
service:
webEngine:
- key: KEY1
value: VALUE1
- key: KEY2
value: VALUE2
Sample labels for WebEngine pods
To set label KEY1 with value VALUE1 and label KEY2 with value VALUE2 on WebEngine pods, add the following to your custom-values.yaml file:
labels:
pod:
webEngine:
- key: KEY1
value: VALUE1
- key: KEY2
value: VALUE2
Configure environment variables for DX Compose resources
This section explains the configuration of environment variables for different DX Compose resources.
Environment variables
To configure environment variables for kubernetes pods, update your custom-values.yaml file as below.
Note
Additional environment values are not mandatory for a deployment.
Note
This environment variable only applies to Pod's main container and will not apply to other containers of the Pod (i.e., logging sidecar).
Sample environment variables for WebEngine pods
To set environment variable KEY1 with value VALUE1 and environment variable KEY2 with value VALUE2 on WebEngine pods, add the following to your custom-values.yaml file:
environment:
pod:
webEngine:
- name: KEY1
value: VALUE1
- name: KEY2
value: VALUE2