sparse-intern-71089
09/02/2021, 8:32 PMbored-table-20691
09/02/2021, 8:52 PMcontourDeploy, err := yaml.NewConfigFile(ctx, "contour-deploy-file", &yaml.ConfigFileArgs{
File: "./contour.yaml",
Transformations: []yaml.Transformation{
// Use an NLB instead of an ELB
func(state map[string]interface{}, opts ...pulumi.ResourceOption) {
metadata := state["metadata"].(map[string]interface{})
name := metadata["name"]
if state["kind"] == "Service" && name == "envoy" {
annotations := metadata["annotations"].(map[string]interface{})
delete(annotations, "<http://service.beta.kubernetes.io/aws-load-balancer-backend-protocol|service.beta.kubernetes.io/aws-load-balancer-backend-protocol>")
annotations["<http://service.beta.kubernetes.io/aws-load-balancer-type|service.beta.kubernetes.io/aws-load-balancer-type>"] = "nlb"
}
},
},
}, pulumi.Provider(eksConfig.Provider))
if err != nil {
return nil, err
}
contourService := contourDeploy.GetResource("v1/Service", "envoy", "projectcontour").(*corev1.Service)
contourServiceLB := contourService.Status.LoadBalancer().Ingress().Index(<http://pulumi.Int|pulumi.Int>(0)).Hostname().Elem()
future-refrigerator-88869
09/02/2021, 8:56 PMcalm-quill-21760
09/02/2021, 8:56 PMstatus
and then status.loadBalancer
?future-refrigerator-88869
09/02/2021, 8:57 PMcontourServiceLB := contourService.Status.LoadBalancer().Ingress().Index(<http://pulumi.Int|pulumi.Int>(0)).Hostname().Elem()
that should be the equivalent of my export (i tried just exporting it without applying too). the result is undefined.future-refrigerator-88869
09/02/2021, 8:57 PMstatus
is empty.calm-quill-21760
09/02/2021, 8:57 PMcalm-quill-21760
09/02/2021, 8:57 PMfuture-refrigerator-88869
09/02/2021, 8:57 PMcalm-quill-21760
09/02/2021, 8:58 PMingress.status
?calm-quill-21760
09/02/2021, 8:58 PMingress
?future-refrigerator-88869
09/02/2021, 8:59 PMingress.status
is the one i am interested in but it is empty. It seems like it's not awaiting the creation of the ELB. I can see in aws console that when the ELB begins creation the pulumi up
finishes execution while the elb is still deploying.calm-quill-21760
09/02/2021, 8:59 PMingress
itself?future-refrigerator-88869
09/02/2021, 9:00 PMbored-table-20691
09/02/2021, 9:00 PMingress
is not marked correctly in terms of this being an output, I’m not sure. In my case, I am not using an ingress object and I go to the underlying Service
bored-table-20691
09/02/2021, 9:01 PMService
that Ingress
is creating under the hood (I believe it does this)?future-refrigerator-88869
09/02/2021, 9:02 PMk8s.networking.v1.Ingress
is not exporting the ingress.status
while the k8s.extensions.v1beta1.Ingress
is working fine. So maybe there's a problem therebored-table-20691
09/02/2021, 9:03 PMfuture-refrigerator-88869
09/02/2021, 9:03 PMservice
or the elastic load balancer that is being created ?bored-table-20691
09/02/2021, 9:03 PMLoadBalancer
from that.future-refrigerator-88869
09/02/2021, 9:04 PMfuture-refrigerator-88869
09/02/2021, 9:10 PMservice.status.loadBalancer.ingress
is {}
bored-table-20691
09/02/2021, 9:13 PMbored-table-20691
09/02/2021, 9:14 PM