Skip to content

Commit

Permalink
fix(kind): fix dependsOnCrd
Browse files Browse the repository at this point in the history
Signed-off-by: Wassim DHIF <wassim.dhif@datadoghq.com>
  • Loading branch information
wdhif committed Nov 21, 2024
1 parent aa7598a commit 88448c1
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions scenarios/aws/kindvm/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func Run(ctx *pulumi.Context) error {
return err
}

var dependsOnCrd pulumi.ResourceOption
dependsOnCrd := make([]pulumi.Resource, 0)

var fakeIntake *fakeintakeComp.Fakeintake
if awsEnv.AgentUseFakeintake() {
Expand Down Expand Up @@ -121,7 +121,7 @@ agents:
return err
}

dependsOnCrd = utils.PulumiDependsOn(k8sAgentComponent)
dependsOnCrd = append(dependsOnCrd, k8sAgentComponent)
}

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

dependsOnCrd = utils.PulumiDependsOn(operatorAgentComponent)
dependsOnCrd = append(dependsOnCrd, 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, dependsOnCrd); err != nil {
if _, err := nginx.K8sAppDefinition(&awsEnv, kindKubeProvider, "workload-nginx", "", true, utils.PulumiDependsOn(dependsOnCrd...)); err != nil {
return err
}

if _, err := redis.K8sAppDefinition(&awsEnv, kindKubeProvider, "workload-redis", true, dependsOnCrd); err != nil {
if _, err := redis.K8sAppDefinition(&awsEnv, kindKubeProvider, "workload-redis", true, utils.PulumiDependsOn(dependsOnCrd...)); err != nil {
return err
}

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

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

Expand All @@ -200,7 +200,7 @@ agents:
return err
}

if _, err := mutatedbyadmissioncontroller.K8sAppDefinition(&awsEnv, kindKubeProvider, "workload-mutated", "workload-mutated-lib-injection", dependsOnCrd); err != nil {
if _, err := mutatedbyadmissioncontroller.K8sAppDefinition(&awsEnv, kindKubeProvider, "workload-mutated", "workload-mutated-lib-injection", utils.PulumiDependsOn(dependsOnCrd...)); err != nil {
return err
}
}
Expand Down

0 comments on commit 88448c1

Please sign in to comment.