What you would like to be added?
Expose the pod index within a PodClique as a pod label (grove.io/podclique-pod-index) and source the GROVE_PCLQ_POD_INDEX environment variable from that label via Kubernetes Downward API (fieldRef).
Why is this needed?
As a PCS user, I need to define custom environment variables that are derived from the pod index (e.g. ENGINE_ID used by Dynamo applications). Today, GROVE_PCLQ_POD_INDEX is injected by the operator as a direct value at pod creation time, which means there is no way for users to reference it in their own env var definitions via the Downward API.
By exposing the pod index as a label, users can define their own env vars that reference it:
env:
- name: ENGINE_ID
valueFrom:
fieldRef:
fieldPath: metadata.labels['grove.io/podclique-pod-index']
This is consistent with how GROVE_PCSG_INDEX and GROVE_PCSG_NAME are already exposed via labels and fieldRef.
What you would like to be added?
Expose the pod index within a PodClique as a pod label (
grove.io/podclique-pod-index) and source theGROVE_PCLQ_POD_INDEXenvironment variable from that label via Kubernetes Downward API (fieldRef).Why is this needed?
As a PCS user, I need to define custom environment variables that are derived from the pod index (e.g.
ENGINE_IDused by Dynamo applications). Today,GROVE_PCLQ_POD_INDEXis injected by the operator as a direct value at pod creation time, which means there is no way for users to reference it in their own env var definitions via the Downward API.By exposing the pod index as a label, users can define their own env vars that reference it:
This is consistent with how
GROVE_PCSG_INDEXandGROVE_PCSG_NAMEare already exposed via labels andfieldRef.