Skip to content

Commit

Permalink
[mq] working branch - merge 561ddfc on top of main at 693094f
Browse files Browse the repository at this point in the history
{"baseBranch":"main","baseCommit":"693094f983163f4af8f3931041a7331142a4c2e2","createdAt":"2024-11-27T13:47:16.186550Z","headSha":"561ddfcbf1187a648ad25e8764ef9287286fe890","id":"98f05e12-f3d1-4746-9838-4329875f0b0d","priority":"200","pullRequestNumber":"1265","queuedAt":"2024-11-27T13:47:16.185055Z","status":"STATUS_QUEUED"}
  • Loading branch information
dd-mergequeue[bot] authored Nov 27, 2024
2 parents ccec980 + 561ddfc commit ef1bc0d
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 39 deletions.
25 changes: 12 additions & 13 deletions scenarios/aws/eks/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,7 @@ func Run(ctx *pulumi.Context) error {
return err
}
}

var dependsOnDDAgent pulumi.ResourceOption
workloadWithCRDDeps := make([]pulumi.Resource, 0)
if awsEnv.AgentDeploy() {
k8sAgentOptions := make([]kubernetesagentparams.Option, 0)
k8sAgentOptions = append(
Expand All @@ -86,51 +85,51 @@ func Run(ctx *pulumi.Context) error {
return err
}

dependsOnDDAgent = utils.PulumiDependsOn(k8sAgentComponent)
}
workloadWithCRDDeps = append(workloadWithCRDDeps, k8sAgentComponent)

}
// Deploy standalone dogstatsd
if awsEnv.DogstatsdDeploy() {
if _, err := dogstatsdstandalone.K8sAppDefinition(&awsEnv, cluster.KubeProvider, "dogstatsd-standalone", fakeIntake, true, ""); err != nil {
if _, err := dogstatsdstandalone.K8sAppDefinition(&awsEnv, cluster.KubeProvider, "dogstatsd-standalone", fakeIntake, true, "", utils.PulumiDependsOn(cluster)); err != nil {
return err
}
}

// Deploy testing workload
if awsEnv.TestingWorkloadDeploy() {
if _, err := nginx.K8sAppDefinition(&awsEnv, cluster.KubeProvider, "workload-nginx", "", true, dependsOnDDAgent /* for DDM */); err != nil {
if _, err := nginx.K8sAppDefinition(&awsEnv, cluster.KubeProvider, "workload-nginx", "", true, utils.PulumiDependsOn(workloadWithCRDDeps...)); err != nil {
return err
}

if _, err := redis.K8sAppDefinition(&awsEnv, cluster.KubeProvider, "workload-redis", true, dependsOnDDAgent /* for DDM */); err != nil {
if _, err := redis.K8sAppDefinition(&awsEnv, cluster.KubeProvider, "workload-redis", true, utils.PulumiDependsOn(workloadWithCRDDeps...)); err != nil {
return err
}

if _, err := cpustress.K8sAppDefinition(&awsEnv, cluster.KubeProvider, "workload-cpustress"); err != nil {
if _, err := cpustress.K8sAppDefinition(&awsEnv, cluster.KubeProvider, "workload-cpustress", utils.PulumiDependsOn(cluster)); err != nil {
return err
}

// dogstatsd clients that report to the Agent
if _, err := dogstatsd.K8sAppDefinition(&awsEnv, cluster.KubeProvider, "workload-dogstatsd", 8125, "/var/run/datadog/dsd.socket", dependsOnDDAgent /* for admission */); err != nil {
if _, err := dogstatsd.K8sAppDefinition(&awsEnv, cluster.KubeProvider, "workload-dogstatsd", 8125, "/var/run/datadog/dsd.socket", utils.PulumiDependsOn(workloadWithCRDDeps...)); err != nil {
return err
}

if awsEnv.DogstatsdDeploy() {
// dogstatsd clients that report to the dogstatsd standalone deployment
if _, err := dogstatsd.K8sAppDefinition(&awsEnv, cluster.KubeProvider, "workload-dogstatsd-standalone", dogstatsdstandalone.HostPort, dogstatsdstandalone.Socket, dependsOnDDAgent /* for admission */); err != nil {
if _, err := dogstatsd.K8sAppDefinition(&awsEnv, cluster.KubeProvider, "workload-dogstatsd-standalone", dogstatsdstandalone.HostPort, dogstatsdstandalone.Socket, utils.PulumiDependsOn(cluster)); err != nil {
return err
}
}

if _, err := tracegen.K8sAppDefinition(&awsEnv, cluster.KubeProvider, "workload-tracegen"); err != nil {
if _, err := tracegen.K8sAppDefinition(&awsEnv, cluster.KubeProvider, "workload-tracegen", utils.PulumiDependsOn(cluster)); err != nil {
return err
}

if _, err := prometheus.K8sAppDefinition(&awsEnv, cluster.KubeProvider, "workload-prometheus"); err != nil {
if _, err := prometheus.K8sAppDefinition(&awsEnv, cluster.KubeProvider, "workload-prometheus", utils.PulumiDependsOn(cluster)); err != nil {
return err
}

if _, err := mutatedbyadmissioncontroller.K8sAppDefinition(&awsEnv, cluster.KubeProvider, "workload-mutated", "workload-mutated-lib-injection", dependsOnDDAgent /* for admission */); err != nil {
if _, err := mutatedbyadmissioncontroller.K8sAppDefinition(&awsEnv, cluster.KubeProvider, "workload-mutated", "workload-mutated-lib-injection", utils.PulumiDependsOn(workloadWithCRDDeps...)); err != nil {
return err
}
}
Expand Down
18 changes: 9 additions & 9 deletions scenarios/aws/kindvm/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ func Run(ctx *pulumi.Context) error {
return err
}

var dependsOnCrd pulumi.ResourceOption

var fakeIntake *fakeintakeComp.Fakeintake
if awsEnv.AgentUseFakeintake() {
fakeIntakeOptions := []fakeintake.Option{
Expand All @@ -85,8 +87,6 @@ func Run(ctx *pulumi.Context) error {
}
}

var dependsOnDDAgent pulumi.ResourceOption

// Deploy the agent
if awsEnv.AgentDeploy() && !awsEnv.AgentDeployWithOperator() {
customValues := `
Expand Down Expand Up @@ -121,7 +121,7 @@ agents:
return err
}

dependsOnDDAgent = utils.PulumiDependsOn(k8sAgentComponent)
dependsOnCrd = utils.PulumiDependsOn(k8sAgentComponent)
}

// Deploy the operator
Expand Down Expand Up @@ -152,7 +152,7 @@ agents:
return err
}

dependsOnDDAgent = utils.PulumiDependsOn(operatorAgentComponent)
dependsOnCrd = utils.PulumiDependsOn(operatorAgentComponent)

if err := operatorAgentComponent.Export(awsEnv.Ctx(), nil); err != nil {
return err
Expand All @@ -169,11 +169,11 @@ agents:

// Deploy testing workload
if awsEnv.TestingWorkloadDeploy() {
if _, err := nginx.K8sAppDefinition(&awsEnv, kindKubeProvider, "workload-nginx", "", true, dependsOnDDAgent /* for DDM */); err != nil {
if _, err := nginx.K8sAppDefinition(&awsEnv, kindKubeProvider, "workload-nginx", "", true, dependsOnCrd); err != nil {
return err
}

if _, err := redis.K8sAppDefinition(&awsEnv, kindKubeProvider, "workload-redis", true, dependsOnDDAgent /* for DDM */); err != nil {
if _, err := redis.K8sAppDefinition(&awsEnv, kindKubeProvider, "workload-redis", true, dependsOnCrd); err != nil {
return err
}

Expand All @@ -182,13 +182,13 @@ agents:
}

// dogstatsd clients that report to the Agent
if _, err := dogstatsd.K8sAppDefinition(&awsEnv, kindKubeProvider, "workload-dogstatsd", 8125, "/var/run/datadog/dsd.socket", dependsOnDDAgent /* for admission */); err != nil {
if _, err := dogstatsd.K8sAppDefinition(&awsEnv, kindKubeProvider, "workload-dogstatsd", 8125, "/var/run/datadog/dsd.socket"); err != nil {
return err
}

// dogstatsd clients that report to the dogstatsd standalone deployment
if awsEnv.DogstatsdDeploy() {
if _, err := dogstatsd.K8sAppDefinition(&awsEnv, kindKubeProvider, "workload-dogstatsd-standalone", dogstatsdstandalone.HostPort, dogstatsdstandalone.Socket, dependsOnDDAgent /* for admission */); err != nil {
if _, err := dogstatsd.K8sAppDefinition(&awsEnv, kindKubeProvider, "workload-dogstatsd-standalone", dogstatsdstandalone.HostPort, dogstatsdstandalone.Socket); err != nil {
return err
}
}
Expand All @@ -202,7 +202,7 @@ agents:
return err
}

if _, err := mutatedbyadmissioncontroller.K8sAppDefinition(&awsEnv, kindKubeProvider, "workload-mutated", "workload-mutated-lib-injection", dependsOnDDAgent /* for admission */); err != nil {
if _, err := mutatedbyadmissioncontroller.K8sAppDefinition(&awsEnv, kindKubeProvider, "workload-mutated", "workload-mutated-lib-injection"); err != nil {
return err
}
}
Expand Down
16 changes: 8 additions & 8 deletions scenarios/azure/aks/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func Run(ctx *pulumi.Context) error {
return err
}

var dependsOnDDAgent pulumi.ResourceOption
var dependsOnCrd pulumi.ResourceOption

// Deploy the agent
if env.AgentDeploy() {
Expand Down Expand Up @@ -87,7 +87,7 @@ providers:
return err
}

dependsOnDDAgent = utils.PulumiDependsOn(k8sAgentComponent)
dependsOnCrd = utils.PulumiDependsOn(k8sAgentComponent)
}

// Deploy standalone dogstatsd
Expand All @@ -99,15 +99,15 @@ providers:

// Deploy testing workload
if env.TestingWorkloadDeploy() {
if _, err := nginx.K8sAppDefinition(&env, aksCluster.KubeProvider, "workload-nginx", "", true, dependsOnDDAgent /* for DDM */); err != nil {
if _, err := nginx.K8sAppDefinition(&env, aksCluster.KubeProvider, "workload-nginx", "", true, dependsOnCrd); err != nil {
return err
}

if _, err := nginx.K8sAppDefinition(&env, aksCluster.KubeProvider, "workload-nginx-kata", kataRuntimeClass, true, dependsOnDDAgent /* for DDM */); err != nil {
if _, err := nginx.K8sAppDefinition(&env, aksCluster.KubeProvider, "workload-nginx-kata", kataRuntimeClass, true, dependsOnCrd); err != nil {
return err
}

if _, err := redis.K8sAppDefinition(&env, aksCluster.KubeProvider, "workload-redis", true, dependsOnDDAgent /* for DDM */); err != nil {
if _, err := redis.K8sAppDefinition(&env, aksCluster.KubeProvider, "workload-redis", true, dependsOnCrd); err != nil {
return err
}

Expand All @@ -116,13 +116,13 @@ providers:
}

// dogstatsd clients that report to the Agent
if _, err := dogstatsd.K8sAppDefinition(&env, aksCluster.KubeProvider, "workload-dogstatsd", 8125, "/var/run/datadog/dsd.socket", dependsOnDDAgent /* for admission */); err != nil {
if _, err := dogstatsd.K8sAppDefinition(&env, aksCluster.KubeProvider, "workload-dogstatsd", 8125, "/var/run/datadog/dsd.socket"); err != nil {
return err
}

if env.DogstatsdDeploy() {
// dogstatsd clients that report to the dogstatsd standalone deployment
if _, err := dogstatsd.K8sAppDefinition(&env, aksCluster.KubeProvider, "workload-dogstatsd-standalone", dogstatsdstandalone.HostPort, dogstatsdstandalone.Socket, dependsOnDDAgent /* for admission */); err != nil {
if _, err := dogstatsd.K8sAppDefinition(&env, aksCluster.KubeProvider, "workload-dogstatsd-standalone", dogstatsdstandalone.HostPort, dogstatsdstandalone.Socket); err != nil {
return err
}
}
Expand All @@ -131,7 +131,7 @@ providers:
return err
}

if _, err := mutatedbyadmissioncontroller.K8sAppDefinition(&env, aksCluster.KubeProvider, "workload-mutated", "workload-mutated-lib-injection", dependsOnDDAgent /* for admission */); err != nil {
if _, err := mutatedbyadmissioncontroller.K8sAppDefinition(&env, aksCluster.KubeProvider, "workload-mutated", "workload-mutated-lib-injection"); err != nil {
return err
}
}
Expand Down
18 changes: 9 additions & 9 deletions scenarios/gcp/gke/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func Run(ctx *pulumi.Context) error {
return err
}

var dependsOnDDAgent pulumi.ResourceOption
var dependsOnCrd pulumi.ResourceOption

// Deploy the agent
if env.AgentDeploy() {
Expand Down Expand Up @@ -75,25 +75,25 @@ func Run(ctx *pulumi.Context) error {
return err
}

dependsOnDDAgent = utils.PulumiDependsOn(k8sAgentComponent)
dependsOnCrd = utils.PulumiDependsOn(k8sAgentComponent)
}

// Deploy testing workload
if env.TestingWorkloadDeploy() {

if _, err := nginx.K8sAppDefinition(&env, cluster.KubeProvider, "workload-nginx", "", true, dependsOnDDAgent /* for DDM */); err != nil {
if _, err := nginx.K8sAppDefinition(&env, cluster.KubeProvider, "workload-nginx", "", true, dependsOnCrd); err != nil {
return err
}

if _, err := cpustress.K8sAppDefinition(&env, cluster.KubeProvider, "workload-cpustress"); err != nil {
if _, err := cpustress.K8sAppDefinition(&env, cluster.KubeProvider, "workload-cpustress", dependsOnCrd); err != nil {
return err
}

if _, err := prometheus.K8sAppDefinition(&env, cluster.KubeProvider, "workload-prometheus"); err != nil {
if _, err := prometheus.K8sAppDefinition(&env, cluster.KubeProvider, "workload-prometheus", dependsOnCrd); err != nil {
return err
}

if _, err := mutatedbyadmissioncontroller.K8sAppDefinition(&env, cluster.KubeProvider, "workload-mutated", "workload-mutated-lib-injection", dependsOnDDAgent /* for admission */); err != nil {
if _, err := mutatedbyadmissioncontroller.K8sAppDefinition(&env, cluster.KubeProvider, "workload-mutated", "workload-mutated-lib-injection", dependsOnCrd); err != nil {
return err
}

Expand All @@ -106,17 +106,17 @@ func Run(ctx *pulumi.Context) error {
}

// dogstatsd clients that report to the dogstatsd standalone deployment
if _, err := dogstatsd.K8sAppDefinition(&env, cluster.KubeProvider, "workload-dogstatsd-standalone", dogstatsdstandalone.HostPort, dogstatsdstandalone.Socket, dependsOnDDAgent /* for admission */); err != nil {
if _, err := dogstatsd.K8sAppDefinition(&env, cluster.KubeProvider, "workload-dogstatsd-standalone", dogstatsdstandalone.HostPort, dogstatsdstandalone.Socket, dependsOnCrd); err != nil {
return err
}
}

// dogstatsd clients that report to the Agent
if _, err := dogstatsd.K8sAppDefinition(&env, cluster.KubeProvider, "workload-dogstatsd", 8125, "/var/run/datadog/dsd.socket", dependsOnDDAgent /* for admission */); err != nil {
if _, err := dogstatsd.K8sAppDefinition(&env, cluster.KubeProvider, "workload-dogstatsd", 8125, "/var/run/datadog/dsd.socket", dependsOnCrd); err != nil {
return err
}

if _, err := tracegen.K8sAppDefinition(&env, cluster.KubeProvider, "workload-tracegen"); err != nil {
if _, err := tracegen.K8sAppDefinition(&env, cluster.KubeProvider, "workload-tracegen", dependsOnCrd); err != nil {
return err
}
}
Expand Down

0 comments on commit ef1bc0d

Please sign in to comment.