This message was deleted.
# general
s
This message was deleted.
1
b
this should not fail, can you share your whole code?
a
The thing is that code works perfectly fine if I comment out the
Service.get
, run
pulumi up
, then return the
Service.get
and run
pulumi up
again. But I’d like not to do that for every stack.
Sure, here is the code:
Copy code
const gateway = new k8s.helm.v3.Release('istio-gateway', {
    name: 'istio-ingressgateway',
    chart: 'gateway',
    createNamespace: true,
    namespace: 'istio-system',
    forceUpdate: true,
    repositoryOpts: {
      repo: '<https://istio-release.storage.googleapis.com/charts>',
    },
    values: {
      labels: {
        app: 'istio-ingressgateway',
        istio: 'ingressgateway',
      },
    },
  }, {
    provider,
    dependsOn: [istiod],
  });

  const gatewayService = k8s.core.v1.Service.get("istio-gateway-service", pulumi.interpolate`${gateway.namespace}/${gateway.name}`, { dependsOn: [gateway] });
  const clusterIp = gatewayService.status.loadBalancer.ingress[0].ip;
looks pretty similar to the example you’ve mentioned
b
if you do
kubectl get svc
on the
istio-system
namespace, what is returned?
a
ohh, i see. the trick is it should be `pulumi.interpolate`${gateway.status.namespace}/${gateway.status.name}`
so the
.status
was missing
@billowy-army-68599 thanks a lot for the link
b
ah yeah that’ll do it, the outputs don’t resolve until status is there
glad you got it working!
🙌 1