From 88448c1187ff48ecc9f6592438539389146c3802 Mon Sep 17 00:00:00 2001 From: Wassim DHIF Date: Thu, 21 Nov 2024 14:24:02 +0100 Subject: [PATCH] fix(kind): fix dependsOnCrd Signed-off-by: Wassim DHIF --- scenarios/aws/kindvm/run.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/scenarios/aws/kindvm/run.go b/scenarios/aws/kindvm/run.go index 580b4bf90..889441b46 100644 --- a/scenarios/aws/kindvm/run.go +++ b/scenarios/aws/kindvm/run.go @@ -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() { @@ -121,7 +121,7 @@ agents: return err } - dependsOnCrd = utils.PulumiDependsOn(k8sAgentComponent) + dependsOnCrd = append(dependsOnCrd, k8sAgentComponent) } // Deploy the operator @@ -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 @@ -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 } @@ -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 } @@ -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 } }