Skip to content

Commit

Permalink
Add KSM configuration to collect DatadogMetric
Browse files Browse the repository at this point in the history
  • Loading branch information
L3n41c committed Dec 20, 2024
1 parent 221bbc8 commit 9d181c9
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions components/datadog/agent/kubernetes_helm.go
Original file line number Diff line number Diff line change
Expand Up @@ -448,6 +448,38 @@ func buildLinuxHelmValues(baseName, agentImagePath, agentImageTag, clusterAgentI
},
"labels_as_tags": map[string]interface{}{},
"annotations_as_tags": map[string]interface{}{},
"custom_resource": map[string]interface{}{
"spec": map[string]interface{}{
"resources": []map[string]interface{}{
{
"groupVersionKind": map[string]interface{}{
"group": "datadoghq.com",
"kind": "DatadogMetric",
"version": "v1alpha1",
},
"commonLabels": map[string]interface{}{
"cr_type": "ddm",
},
"labelsFromPath": map[string]interface{}{
"ddm_namespace": []string{"metadata", "namespace"},
"ddm_name": []string{"metadata", "name"},
},
"metrics": []map[string]interface{}{
{
"name": "ddm_value",
"help": "DatadogMetric value",
"each": map[string]interface{}{
"type": "gauge",
"gauge": map[string]interface{}{
"path": []string{"status", "currentValue"},
},
},
},
},
},
},
},
},
},
},
})),
Expand Down

0 comments on commit 9d181c9

Please sign in to comment.