diff --git a/components/datadog/agent/kubernetes_helm.go b/components/datadog/agent/kubernetes_helm.go index 94c6ea7c7..2501312aa 100644 --- a/components/datadog/agent/kubernetes_helm.go +++ b/components/datadog/agent/kubernetes_helm.go @@ -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), @@ -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{ @@ -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"), diff --git a/components/datadog/agent/kubernetes_helm_utils.go b/components/datadog/agent/kubernetes_helm_utils.go deleted file mode 100644 index 2bbeb9b71..000000000 --- a/components/datadog/agent/kubernetes_helm_utils.go +++ /dev/null @@ -1,33 +0,0 @@ -package agent - -import "encoding/json" - -// TODO: Remove these defaults when kubernetes_resource_labels_as_tags and kubernetes_resource_annotations_as_tags are added to the helm chart - -type KubernetesResourcesMetadataAsTags map[string]map[string]string - -func (k KubernetesResourcesMetadataAsTags) toJSONString() string { - bytes, err := json.Marshal(k) - if err != nil { - return "" - } - - return string(bytes) -} - -func getResourcesLabelsAsTags() KubernetesResourcesMetadataAsTags { - return KubernetesResourcesMetadataAsTags{ - "deployments.apps": {"x-team": "team"}, - "pods": {"x-parent-type": "domain"}, - "namespaces": {"kubernetes.io/metadata.name": "metadata-name"}, - "nodes": {"kubernetes.io/os": "os", "kubernetes.io/arch": "arch"}, - } -} - -func getResourcesAnnotationsAsTags() KubernetesResourcesMetadataAsTags { - return KubernetesResourcesMetadataAsTags{ - "deployments.apps": {"x-sub-team": "sub-team"}, - "pods": {"x-parent-name": "parent-name"}, - "namespaces": {"related_email": "mail"}, - } -} diff --git a/components/datadog/apps/dogstatsd/images/dogstatsd/go.mod b/components/datadog/apps/dogstatsd/images/dogstatsd/go.mod index ee48b3291..91e08f08d 100644 --- a/components/datadog/apps/dogstatsd/images/dogstatsd/go.mod +++ b/components/datadog/apps/dogstatsd/images/dogstatsd/go.mod @@ -2,12 +2,9 @@ module dogstatsd go 1.22 -require github.com/DataDog/datadog-go/v5 v5.5.0 +require github.com/DataDog/datadog-go/v5 v5.6.0 require ( github.com/Microsoft/go-winio v0.5.0 // indirect golang.org/x/sys v0.0.0-20210510120138-977fb7262007 // indirect ) - -// Temporary replacement of the main branch until https://github.com/DataDog/datadog-go/pull/304 is released -replace github.com/DataDog/datadog-go/v5 => github.com/DataDog/datadog-go/v5 v5.5.1-0.20240327105053-fa1f6814eaf7 diff --git a/components/datadog/apps/dogstatsd/images/dogstatsd/go.sum b/components/datadog/apps/dogstatsd/images/dogstatsd/go.sum index 8de2f7e95..4c1c48ccb 100644 --- a/components/datadog/apps/dogstatsd/images/dogstatsd/go.sum +++ b/components/datadog/apps/dogstatsd/images/dogstatsd/go.sum @@ -1,5 +1,5 @@ -github.com/DataDog/datadog-go/v5 v5.5.1-0.20240327105053-fa1f6814eaf7 h1:pOfzUVqO/rT7VTY9L7qK5oeiuBBIiuZgt0Nf7J3ywDQ= -github.com/DataDog/datadog-go/v5 v5.5.1-0.20240327105053-fa1f6814eaf7/go.mod h1:K9kcYBlxkcPP8tvvjZZKs/m1edNAUFzBbdpTUKfCsuw= +github.com/DataDog/datadog-go/v5 v5.6.0 h1:2oCLxjF/4htd55piM75baflj/KoE6VYS7alEUqFvRDw= +github.com/DataDog/datadog-go/v5 v5.6.0/go.mod h1:K9kcYBlxkcPP8tvvjZZKs/m1edNAUFzBbdpTUKfCsuw= github.com/Microsoft/go-winio v0.5.0 h1:Elr9Wn+sGKPlkaBvwu4mTrxtmOp3F3yV9qhaHbXGjwU= github.com/Microsoft/go-winio v0.5.0/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= diff --git a/components/datadog/apps/nginx/k8s.go b/components/datadog/apps/nginx/k8s.go index 50fee6c18..0d5140006 100644 --- a/components/datadog/apps/nginx/k8s.go +++ b/components/datadog/apps/nginx/k8s.go @@ -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("team-container-platform@datadoghq.com"), diff --git a/go.mod b/go.mod index 68f0dfc35..3df87dc63 100644 --- a/go.mod +++ b/go.mod @@ -23,7 +23,7 @@ require ( github.com/pulumi/pulumi-azure-native-sdk/network/v2 v2.73.1 github.com/pulumi/pulumi-azure-native-sdk/v2 v2.73.1 github.com/pulumi/pulumi-command/sdk v1.0.1 - github.com/pulumi/pulumi-docker/sdk/v4 v4.5.5 + github.com/pulumi/pulumi-docker/sdk/v4 v4.5.7 github.com/pulumi/pulumi-eks/sdk/v3 v3.4.0 github.com/pulumi/pulumi-gcp/sdk/v7 v7.38.0 github.com/pulumi/pulumi-kubernetes/sdk/v4 v4.18.3 diff --git a/go.sum b/go.sum index 9741b7ce9..e5e64d8ef 100644 --- a/go.sum +++ b/go.sum @@ -224,8 +224,8 @@ github.com/pulumi/pulumi-azure-native-sdk/v2 v2.73.1 h1:yzXxwwq3tHdtSOi5vjKmKXq7 github.com/pulumi/pulumi-azure-native-sdk/v2 v2.73.1/go.mod h1:ChjIUNDNeN6jI33ZOivHUFqM6purDiLP01mghMGe1Fs= github.com/pulumi/pulumi-command/sdk v1.0.1 h1:ZuBSFT57nxg/fs8yBymUhKLkjJ6qmyN3gNvlY/idiN0= github.com/pulumi/pulumi-command/sdk v1.0.1/go.mod h1:C7sfdFbUIoXKoIASfXUbP/U9xnwPfxvz8dBpFodohlA= -github.com/pulumi/pulumi-docker/sdk/v4 v4.5.5 h1:7OjAfgLz5PAy95ynbgPAlWls5WBe4I/QW/61TdPWRlQ= -github.com/pulumi/pulumi-docker/sdk/v4 v4.5.5/go.mod h1:XZKLFXbw13olxuztlWnmVUPYZp2a+BqzqhuMl0j/Ow8= +github.com/pulumi/pulumi-docker/sdk/v4 v4.5.7 h1:cuIl5YyIghqtnFMGsdtPOeaNSix5S2CrqO0/UZ1Yjsc= +github.com/pulumi/pulumi-docker/sdk/v4 v4.5.7/go.mod h1:f2ek887nKRSwNtqTqCFENJSOH0PXm1b3FhzSXYL0IyM= github.com/pulumi/pulumi-eks/sdk/v3 v3.4.0 h1:s2Cpu6E2lmADNUbutbJGm6O+O9j0mBLlrhQmc40ukt0= github.com/pulumi/pulumi-eks/sdk/v3 v3.4.0/go.mod h1:QbAamxfUpDJC81BGtyEuV0P88RrdbOjQEhbgY+OOPpg= github.com/pulumi/pulumi-gcp/sdk/v7 v7.38.0 h1:21oSj+TKlKTzQcxN9Hik7iSNNHPUQXN4s3itOnahy/w=