sparse-intern-71089
02/23/2022, 12:42 PMquiet-wolf-18467
.get
because the Ingress doesn't exist, but on subsequent runs it finds the resource. Is that correct?echoing-postman-88590
02/23/2022, 12:54 PMkubernetes:<http://networking.k8s.io/v1:Ingress|networking.k8s.io/v1:Ingress> (grafana-ingress):
error: 2 errors occurred:
* Resource 'monitoring-grafana' was created but failed to initialize
* Ingress .status.loadBalancer field was not updated with a hostname/IP address.
for more information about this error, see <https://pulumi.io/xdv72s>
echoing-postman-88590
02/23/2022, 12:55 PMquiet-wolf-18467
.get
to:
grafana_ingress = kubernetes.networking.v1.Ingress.get(
"grafana-ingress",
Output.concat("monitoring/monitoring-grafana"),
{ dependsOn: [monitoring] },
)
it should helpquiet-wolf-18467
helm.v3.Release
creation will actually wait for the Ingress to get the public IP, but we need to code that dependency via dependsOn
echoing-postman-88590
02/23/2022, 12:58 PM{"dependsOn": [monitoring]},
or
{dependsOn: [monitoring]},
Otherwise how do I import the dependsOn
function?quiet-wolf-18467
dependsOn
isn't a function, it's a property on the CustomResourceOptions
of Pulumi Resources. Let me check this is an option on Kubernetes provider, please give me a moment.quiet-wolf-18467
get(name: string, id: pulumi.Input<string>, opts?: pulumi.CustomResourceOptions | undefined): k8s.networking.v1.Ingress
echoing-postman-88590
02/23/2022, 1:27 PMgrafana_ingress = kubernetes.networking.v1.Ingress.get(
"grafana-ingress",
Output.concat(monitoring.status.namespace, "/", monitoring.status.name, "-grafana"),
opts=ResourceOptions(depends_on=[monitoring]),
)
I was expecting the monitoring.status
to already establish the dependencyechoing-postman-88590
02/23/2022, 2:01 PMhelm.v3.Release
wait for the creation of the monitoring-grafana
ingress but the ingress itself got a public ip after 90 seconds. That's why it is failing.echoing-postman-88590
02/24/2022, 8:10 AMquiet-wolf-18467
echoing-postman-88590
02/24/2022, 4:16 PM