https://pulumi.com logo
#general
Title
# general
i

incalculable-engineer-92975

09/24/2019, 3:48 PM
When tearing down an EKS cluster, I need to wait after deleting an alb-ingress for the controller to notice the deletion and remove the associated AWS ALB. Is that possible to do?
f

future-barista-68134

09/24/2019, 6:10 PM
How are you creating the EKS cluster?
i

incalculable-engineer-92975

09/24/2019, 10:59 PM
Normal Pulumi script. I see customTimeouts but I don’t see a forced delay.
f

future-barista-68134

09/24/2019, 11:36 PM
are you using the @pulumi/eks package?
Is it two separate resources that you're trying to do this with? If you have some code, that would help me understand better simple smile
i

incalculable-engineer-92975

09/25/2019, 1:08 PM
It's not really an eks specific question I suppose. The ingress controller is being created with the Pulumi k8s package, e.g.,
return new k8s.extensions.v1beta1.Ingress
.
Which happens after the helm chart is run to create the controller that watches for new/updated/deleted ingress and services that reference ALBs.
return new k8s.helm.v2.Chart( 'aws-alb-ingress-controller', { repo: 'incubator', chart: 'aws-alb-ingress-controller', namespace: defaults.istioNamespace, values: { clusterName: clusterDetails.clusterName, awsRegion: config.region, awsVpcID: clusterDetails.vpcId, enableLivenessProbe: true, enableReadinessProbe: true, }, transformations: [setNamespace], }, { dependsOn: [this.istio], provider: this.k8sProvider }, );
(our corp restrictions prevent file uploads and kill the slack code posting)
So to recap, we use Helm to create the controller, then add the ingress which gets noticed by the controller and turned into an ALB.
The
pulumi destroy
works, but wipes out the controller before it has a chance to notice the ingress deletion and remove the ALB.