https://garden.io logo
#🌱|help-and-getting-started
How to add labels to container services?
# 🌱|help-and-getting-started
r

rough-kilobyte-44808

03/15/2023, 7:58 PM
Datadog uses labels for lots of things - I have been unable to figure out how to add labels to services deployed via Garden - is there a way?
b

bright-policeman-43626

03/16/2023, 4:17 AM
Hey @rough-kilobyte-44808 thanks a lot for asking! I would love to know a little bit more of the details, What module are you guys using to deploy your services?
Ex. container, helm, kubernetes
? For example, in the case of the
container
you can use annotations for it? https://docs.garden.io/reference/module-types/container#services-.ingresses-.annotations If I'm not confused with the question, annotations in this case should do the work as it's usually how you setup DataDog to scrap from the service. Please if I'm not going into the right direction feel free to add more details so we can give you the best solution possible! ❤️
r

rough-kilobyte-44808

03/16/2023, 9:52 PM
Yeah, I'm talking about container modules. Some things for datadog are done via annotations, but many of their instructions specify using labels, such as for APM stuff.
b

bright-policeman-43626

03/17/2023, 12:47 PM
Hey @rough-kilobyte-44808 just confirmed that apparently we don't have support for labels and I'm so sorry for that 🥹 . However I would like to give you a little workaround/idea 1. If you create your own Helm Chart to deploy your Kubernetes Applications you could add fields that currently the
container
plugin doesn't support. I would even be open to guide you through the process if you are interested into going through that avenue! Also, would like to ask you if you would be open to creating a
Feature Request
directly in our Github to ask for the
labels
field? I think this is a basic feature that lots of users would get benefit from!
12 Views