datadog-agent
datadog-agent copied to clipboard
How to use variable in container annotations
Below is deployment yaml file
......
spec:
replicas: 1
selector:
matchLabels: {name: vert-${LAUNCH_ID}}
template:
metadata:
annotations:
ad.datadoghq.com/{How to use variable?}.logs: '[{"source":"how to use name that has variable?","service":"search"}]'
name: vert-${LAUNCH_ID}
labels:
app: search
.....
Describe what happened: As we can see that name has a variable "${LAUNCH_ID}".
Describe what you expected: How can we use a variable in annotations?
Steps to reproduce the issue:
Additional environment details (Operating System, Cloud provider, etc): Amazon Linux, Kubernetes
Hi @salimuddin87
This not possible in kubernetes right now. You would need to template this with helm or something else, before you deploy the manifest. It is not something Datadog can change. You can maybe create an issue on the Kubernetes side if you want this to be introduced :)
Thanks