Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Unable to use DD_KUBERNETES_RESOURCES_LABELS_AS_TAGS with resources whose groups contain periods #33646

Open
jscaltreto opened this issue Feb 1, 2025 · 0 comments · May be fixed by #33647

Comments

@jscaltreto
Copy link

Agent Environment
cluster-agent 7.61.0

Describe what happened:

The groupResourceToGVRString function assumes that a resource type in the form {resource}.{group} will only ever contain one period. This means that it's not possible to use DD_KUBERNETES_RESOURCES_LABELS_AS_TAGS with resources whose groups contain a period as one might do if, for example, they wanted to include labels with unbundled events from a CRD.

It's possible to workaround it by also specifying the resource in DD_CLUSTER_AGENT_KUBE_METADATA_COLLECTION_RESOURCES, however an error is still logged on startup.

Relatedly, a similar issue also affects the RBAC configuration in the helm chart.

Describe what you expected:

A key such as my-resource.example.com should be parsed as:

  • resource: my-resource
  • group: example.com

Steps to reproduce the issue:

Configure DD_KUBERNETES_RESOURCES_LABELS_AS_TAGS with keys that contain multiple periods.

Additional environment details (Operating System, Cloud provider, etc):

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant