API key is invalid when used in secret
Output of the info page (if this is a bug)
(Paste the output of the info page here)
Describe what happened: I am running datadog on eks cluster and It's running fine. Below is the way I provided api key:
- name: DD_API_KEY
value: <api-key>
Describe what you expected: When I am creating secret and referred to dd-agent as shown below. It's giving invalid key error.
- name: DD_API_KEY
valueFrom:
secretKeyRef:
name: datadog-secret
key: api-key
Steps to reproduce the issue: create a secret for dd-agent api-key.
Additional environment details (Operating System, Cloud provider, etc): Amazon EKS, Kubernetes
Hey @salimuddin87
There's not much info here to work on but I can confirm that that approach does work. Generally, I would check these things:
- make sure the API secret and Datadog agent are on the same namespace
- the secret name is correct. you used
datadog-secretwhile our templates hasdatadog-agent. Speaking of templates, you can find them here. - make sure that the value of
api-keyis the base64-encoded api key.
Lastly, just looking at the env config you posted at face value, it does not seem to be indented properly (valueFrom should be the same column as name).
Hope this helps. If the issue persists, you can open a support ticket by emailing: [email protected] to troubleshoot this further with our support team.
JM
@JM-Lazaro , Thanks for the advice. I resolved all the issues.