acceptable-intern-25844
06/24/2023, 5:26 PMk8s.helm.v3.Release
to fully install all its resources to get a reference to a resource created by the helm release?
What I’m trying to achieve is install an istio/gateway
helm release and get the k8s Service it creates, to get the Service’s external IP.
I’m getting the resource like this: `const gatewayService = k8s.core.v1.Service.get("istio-gateway-service", pulumi.interpolate`${gateway.namespace}/${gateway.name}`, { dependsOn: [gateway] });`
but it fails with error: Preview failed: resource 'istio-system/istio-ingressgateway' does not exist
and that’s pretty obvious, why would it exist during the preview, when the release is not installed at all?billowy-army-68599
billowy-army-68599
acceptable-intern-25844
06/24/2023, 5:36 PMService.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.acceptable-intern-25844
06/24/2023, 5:37 PMconst 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;
acceptable-intern-25844
06/24/2023, 5:37 PMbillowy-army-68599
kubectl get svc
on the istio-system
namespace, what is returned?acceptable-intern-25844
06/24/2023, 5:39 PMacceptable-intern-25844
06/24/2023, 5:39 PM.status
was missingacceptable-intern-25844
06/24/2023, 5:40 PMbillowy-army-68599
billowy-army-68599