Skip to content

Commit

Permalink
set kubernetesResourcesLabelsAsTags and kubernetesAnnotationsAsTags i…
Browse files Browse the repository at this point in the history
…n helm installation and enable remote tagger in CLC runners (#1300)
  • Loading branch information
adel121 authored Dec 16, 2024
1 parent a34a0df commit a4ab67f
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 44 deletions.
31 changes: 20 additions & 11 deletions components/datadog/agent/kubernetes_helm.go
Original file line number Diff line number Diff line change
Expand Up @@ -223,12 +223,23 @@ func buildLinuxHelmValues(baseName, agentImagePath, agentImageTag, clusterAgentI
"namespaceLabelsAsTags": pulumi.Map{
"related_team": pulumi.String("team"),
},
"originDetectionUnified": pulumi.Map{
"enabled": pulumi.Bool(true),
},
"namespaceAnnotationsAsTags": pulumi.Map{
"related_email": pulumi.String("email"), // should be overridden by kubernetesResourcesAnnotationsAsTags
},
"kubernetesResourcesAnnotationsAsTags": pulumi.Map{
"deployments.apps": pulumi.Map{"x-sub-team": pulumi.String("sub-team")},
"pods": pulumi.Map{"x-parent-name": pulumi.String("parent-name")},
"namespaces": pulumi.Map{"related_email": pulumi.String("mail")},
},
"kubernetesResourcesLabelsAsTags": pulumi.Map{
"deployments.apps": pulumi.Map{"x-team": pulumi.String("team")},
"pods": pulumi.Map{"x-parent-type": pulumi.String("domain")},
"namespaces": pulumi.Map{"related_org": pulumi.String("org")},
"nodes": pulumi.Map{"kubernetes.io/os": pulumi.String("os"), "kubernetes.io/arch": pulumi.String("arch")},
},
"originDetectionUnified": pulumi.Map{
"enabled": pulumi.Bool(true),
},
"logs": pulumi.Map{
"enabled": pulumi.Bool(true),
"containerCollectAll": pulumi.Bool(logsContainerCollectAll),
Expand Down Expand Up @@ -304,14 +315,6 @@ func buildLinuxHelmValues(baseName, agentImagePath, agentImageTag, clusterAgentI
"name": pulumi.String("DD_TELEMETRY_CHECKS"),
"value": pulumi.String("*"),
},
pulumi.StringMap{
"name": pulumi.String("DD_KUBERNETES_RESOURCES_LABELS_AS_TAGS"),
"value": pulumi.JSONMarshal(getResourcesLabelsAsTags().toJSONString()),
},
pulumi.StringMap{
"name": pulumi.String("DD_KUBERNETES_RESOURCES_ANNOTATIONS_AS_TAGS"),
"value": pulumi.JSONMarshal(getResourcesAnnotationsAsTags().toJSONString()),
},
},
},
"agents": pulumi.Map{
Expand Down Expand Up @@ -457,6 +460,12 @@ func buildLinuxHelmValues(baseName, agentImagePath, agentImageTag, clusterAgentI
"tag": pulumi.String(agentImageTag),
"doNotCheckTag": pulumi.Bool(true),
},
"env": pulumi.StringMapArray{
pulumi.StringMap{
"name": pulumi.String("DD_CLC_RUNNER_REMOTE_TAGGER_ENABLED"),
"value": pulumi.String("true"),
},
},
"resources": pulumi.StringMapMap{
"requests": pulumi.StringMap{
"cpu": pulumi.String("20m"),
Expand Down
33 changes: 0 additions & 33 deletions components/datadog/agent/kubernetes_helm_utils.go

This file was deleted.

1 change: 1 addition & 0 deletions components/datadog/apps/nginx/k8s.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ func K8sAppDefinition(e config.Env, kubeProvider *kubernetes.Provider, namespace
Name: pulumi.String(namespace),
Labels: pulumi.StringMap{
"related_team": pulumi.String("contp"),
"related_org": pulumi.String("agent-org"),
},
Annotations: pulumi.StringMap{
"related_email": pulumi.String("[email protected]"),
Expand Down

0 comments on commit a4ab67f

Please sign in to comment.