Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into dependabot/go_modules…
Browse files Browse the repository at this point in the history
…/github.com/pulumi/pulumi-kubernetes/sdk/v4-4.19.0
  • Loading branch information
pducolin committed Dec 18, 2024
2 parents 4b543d4 + 9a55e95 commit a89d914
Show file tree
Hide file tree
Showing 17 changed files with 177 additions and 179 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ jobs:

# Workaround: https://github.com/docker/build-push-action/issues/461
- name: Setup Docker buildx
uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349
uses: docker/setup-buildx-action@6524bf65af31da8d45b59e8c27de4bd072b392f5

# Login against a Docker registry except on PR
# https://github.com/docker/login-action
Expand Down
16 changes: 13 additions & 3 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,19 @@ bump-version-on-datadog-agent:
stage: post-release
image: ${CI_REGISTRY_IMAGE_TEST}:${CI_COMMIT_SHORT_SHA}
tags: ["arch:amd64"]
needs: ["release-runner-image"]
rules:
- if: $CI_COMMIT_BRANCH == "main"
needs: ["release-runner-image"]
when: on_success
- if: $CI_COMMIT_BRANCH =~ /^mq-working-branch-/
when: never
- when: manual
needs: ["build-runner-image"]
allow_failure: true
variables:
EXTRA_UPDATE_ARGS: "--is-dev-image"
variables:
EXTRA_UPDATE_ARGS: ""
before_script:
- set +x
- export GITHUB_APP_USER_ID=153269286 # Can be found on https://api.github.com/users/agent-platform-auto-pr[bot]
Expand All @@ -126,8 +135,9 @@ bump-version-on-datadog-agent:
- pushd datadog-agent
- git checkout -b auto-bump/bump-test-infra-$CI_COMMIT_SHORT_SHA
- export PREVIOUS_SHA=$(cat .gitlab/common/test_infra_version.yml | grep 'TEST_INFRA_DEFINITIONS_BUILDIMAGES:' | awk -F " " '{print $NF}')
- inv -e buildimages.update-test-infra-definitions --commit-sha $CI_COMMIT_SHA
- git add test/new-e2e/go.mod test/new-e2e/go.sum .gitlab/common/test_infra_version.yml
- inv -e buildimages.update-test-infra-definitions --commit-sha $CI_COMMIT_SHA $EXTRA_UPDATE_ARGS
- inv -e tidy
- git add -u
- git commit -m "[test-infra-definitions][automated] Bump test-infra-definitions to $CI_COMMIT_SHORT_SHA"
- git push -f origin auto-bump/bump-test-infra-$CI_COMMIT_SHORT_SHA
- popd
Expand Down
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.

6 changes: 3 additions & 3 deletions components/datadog/agent/kubernetes_operator.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ func NewDDAWithOperator(e config.Env, resourceName string, kubeProvider *kuberne
return err
}

pulumiResourceOptions := append(ddaParams.PulumiResourceOptions, pulumi.Parent(comp))
ddaParams.PulumiResourceOptions = append(ddaParams.PulumiResourceOptions, pulumi.Parent(comp))

_, err = dda.K8sAppDefinition(e, kubeProvider, ddaParams, pulumiResourceOptions...)
_, err = dda.K8sAppDefinition(e, kubeProvider, ddaParams, ddaParams.PulumiResourceOptions...)

if err != nil {
return err
}

baseName := "dda-linux"
baseName := "dda-with-operator-linux"

comp.LinuxNodeAgent, err = componentskube.NewKubernetesObjRef(e, baseName+"-nodeAgent", ddaParams.Namespace, "Pod", pulumi.String("").ToStringOutput(), pulumi.String("datadoghq/v2alpha1").ToStringOutput(), map[string]string{"app.kubernetes.io/instance": ddaParams.DDAConfig.Name + "-agent"})

Expand Down
5 changes: 1 addition & 4 deletions components/datadog/apps/dogstatsd/images/dogstatsd/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions components/datadog/apps/dogstatsd/images/dogstatsd/go.sum
Original file line number Diff line number Diff line change
@@ -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=
Expand Down
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
14 changes: 7 additions & 7 deletions components/datadog/operator/helm.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ type HelmComponent struct {
func NewHelmInstallation(e config.Env, args HelmInstallationArgs, opts ...pulumi.ResourceOption) (*HelmComponent, error) {
apiKey := e.AgentAPIKey()
appKey := e.AgentAPPKey()
baseName := "dda"

opts = append(opts, pulumi.Providers(args.KubeProvider), e.WithProviders(config.ProviderRandom), pulumi.DeletedWith(args.KubeProvider))

helmComponent := &HelmComponent{}
Expand All @@ -64,7 +64,7 @@ func NewHelmInstallation(e config.Env, args HelmInstallationArgs, opts ...pulumi
secret, err := corev1.NewSecret(e.Ctx(), "datadog-credentials", &corev1.SecretArgs{
Metadata: metav1.ObjectMetaArgs{
Namespace: ns.Metadata.Name(),
Name: pulumi.Sprintf("%s-datadog-credentials", baseName),
Name: pulumi.String("dda-datadog-credentials"),
},
StringData: pulumi.StringMap{
"api-key": apiKey,
Expand Down Expand Up @@ -93,9 +93,9 @@ func NewHelmInstallation(e config.Env, args HelmInstallationArgs, opts ...pulumi
operatorImagePath = args.OperatorFullImagePath
}
operatorImagePath, operatorImageTag := utils.ParseImageReference(operatorImagePath)
linuxInstallName := baseName + "-operator-linux"
linuxInstallName := "datadog-operator-linux"

values := buildLinuxHelmValues(baseName, operatorImagePath, operatorImageTag)
values := buildLinuxHelmValues(operatorImagePath, operatorImageTag)
values.configureImagePullSecret(imgPullSecret)

defaultYAMLValues := values.toYAMLPulumiAssetOutput()
Expand Down Expand Up @@ -132,10 +132,10 @@ func NewHelmInstallation(e config.Env, args HelmInstallationArgs, opts ...pulumi

type HelmValues pulumi.Map

func buildLinuxHelmValues(baseName string, operatorImagePath string, operatorImageTag string) HelmValues {
func buildLinuxHelmValues(operatorImagePath string, operatorImageTag string) HelmValues {
return HelmValues{
"apiKeyExistingSecret": pulumi.String(baseName + "-datadog-credentials"),
"appKeyExistingSecret": pulumi.String(baseName + "-datadog-credentials"),
"apiKeyExistingSecret": pulumi.String("dda-datadog-credentials"),
"appKeyExistingSecret": pulumi.String("dda-datadog-credentials"),
"image": pulumi.Map{
"repository": pulumi.String(operatorImagePath),
"tag": pulumi.String(operatorImageTag),
Expand Down
48 changes: 24 additions & 24 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,24 @@ require (
github.com/DataDog/datadog-agent/pkg/util/optional v0.59.1
github.com/Masterminds/semver v1.5.0
github.com/alessio/shellescape v1.4.2
github.com/aws/aws-sdk-go-v2 v1.32.2
github.com/aws/aws-sdk-go-v2/config v1.27.40
github.com/aws/aws-sdk-go-v2/service/ecr v1.36.2
github.com/aws/aws-sdk-go-v2/service/ecs v1.47.4
github.com/aws/aws-sdk-go-v2/service/s3 v1.65.0
github.com/aws/aws-sdk-go-v2 v1.32.6
github.com/aws/aws-sdk-go-v2/config v1.28.6
github.com/aws/aws-sdk-go-v2/service/ecr v1.36.7
github.com/aws/aws-sdk-go-v2/service/ecs v1.52.2
github.com/aws/aws-sdk-go-v2/service/s3 v1.71.0
github.com/cenkalti/backoff/v4 v4.3.0
github.com/google/gofuzz v1.2.0
github.com/pulumi/pulumi-aws/sdk/v6 v6.56.1
github.com/pulumi/pulumi-awsx/sdk/v2 v2.16.1
github.com/pulumi/pulumi-aws/sdk/v6 v6.59.1
github.com/pulumi/pulumi-awsx/sdk/v2 v2.19.0
github.com/pulumi/pulumi-azure-native-sdk/authorization/v2 v2.73.1
github.com/pulumi/pulumi-azure-native-sdk/compute/v2 v2.73.1
github.com/pulumi/pulumi-azure-native-sdk/containerservice/v2 v2.73.1
github.com/pulumi/pulumi-azure-native-sdk/managedidentity/v2 v2.73.1
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-eks/sdk/v3 v3.3.0
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.19.0
github.com/pulumi/pulumi-libvirt/sdk v0.5.3
Expand All @@ -33,7 +33,7 @@ require (
github.com/pulumi/pulumi/sdk/v3 v3.142.0
github.com/pulumiverse/pulumi-time/sdk v0.1.0
github.com/samber/lo v1.47.0
github.com/stretchr/testify v1.9.0
github.com/stretchr/testify v1.10.0
golang.org/x/exp v0.0.0-20240604190554-fc45aab8b7f8
gopkg.in/yaml.v3 v3.0.1
)
Expand All @@ -46,21 +46,21 @@ require (
github.com/agext/levenshtein v1.2.3 // indirect
github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect
github.com/atotto/clipboard v0.1.4 // indirect
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.6 // indirect
github.com/aws/aws-sdk-go-v2/credentials v1.17.38 // indirect
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.14 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.21 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.21 // indirect
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.7 // indirect
github.com/aws/aws-sdk-go-v2/credentials v1.17.47 // indirect
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.21 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.25 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.25 // indirect
github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1 // indirect
github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.19 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.0 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.4.0 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.0 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.18.0 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.23.4 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.27.4 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.31.4 // indirect
github.com/aws/smithy-go v1.22.0 // indirect
github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.25 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.1 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.4.6 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.6 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.18.6 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.24.7 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.6 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.33.2 // indirect
github.com/aws/smithy-go v1.22.1 // indirect
github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect
github.com/blang/semver v3.5.1+incompatible // indirect
github.com/charmbracelet/bubbles v0.18.0 // indirect
Expand Down
Loading

0 comments on commit a89d914

Please sign in to comment.