chilly-photographer-60932
01/30/2019, 5:05 PMk8s
? I have deployed this using helm chart. I am able to get the hang of the service withsomething like this istio.getResource("v1/Service", "istio-ingressgateway");
which returns the k8s
service object https://github.com/pulumi/pulumi-kubernetes/blob/d301148551488034535fc2a66c29aa5a2f86380b/sdk/nodejs/provider.ts#L8435
From this service how do I get the reference to load balancer that was created?gorgeous-egg-16927
01/30/2019, 5:08 PMchilly-photographer-60932
01/30/2019, 5:12 PMpulumi:pulumi:Stack (eks-eks-naveen):
(node:61714) ExperimentalWarning: queueMicrotask() is experimental.
TypeError: Cannot read property 'status' of undefined
const i = istio.getResource("v1/Service", "istio-ingressgateway");
const s = i.apply(u => u.status);
gorgeous-egg-16927
01/30/2019, 6:15 PM.getResource
myself yet, but I suspect you need to add a type hint to const i
so that the compiler knows what kind of resource that call is returning.chilly-photographer-60932
01/30/2019, 6:16 PMgorgeous-egg-16927
01/30/2019, 6:16 PMcreamy-potato-29402
01/30/2019, 6:17 PMchilly-photographer-60932
01/30/2019, 6:32 PMcreamy-potato-29402
01/30/2019, 6:32 PMchilly-photographer-60932
01/30/2019, 6:59 PMcreamy-potato-29402
01/30/2019, 6:59 PMchilly-photographer-60932
01/30/2019, 7:01 PMconst istio = createIstio(cluster);
const i = istio.getResource(
"v1/Service",
"istio-ingressgateway.istio-system.svc.cluster.local"
);
creamy-potato-29402
01/30/2019, 7:01 PM.
what shows up?istio.
chilly-photographer-60932
01/30/2019, 7:01 PMcreateIstio
returns an helm chartcreamy-potato-29402
01/30/2019, 7:02 PMchilly-photographer-60932
01/30/2019, 7:02 PMcreamy-potato-29402
01/30/2019, 7:02 PMistio.
chilly-photographer-60932
01/30/2019, 7:03 PMistio.resources.apply(o => console.log(o));
creamy-potato-29402
01/30/2019, 7:04 PM[Object object]
or something like that.istio.resources.apply(o => Object.keys(o).forEach(console.log));
chilly-photographer-60932
01/30/2019, 7:06 PMurn:
Output {
__pulumiOutput: true,
isKnown: Promise { true },
resources: [Function],
promise: [Function],
apply: [Function],
get: [Function] },
id:
Output {
__pulumiOutput: true,
isKnown: Promise { <pending> },
resources: [Function],
promise: [Function],
apply: [Function],
get: [Function] },
apiVersion:
Output {
__pulumiOutput: true,
isKnown: Promise { <pending> },
resources: [Function],
promise: [Function],
apply: [Function],
get: [Function] },
kind:
Output {
__pulumiOutput: true,
isKnown: Promise { <pending> },
resources: [Function],
promise: [Function],
apply: [Function],
get: [Function] },
metadata:
Output {
__pulumiOutput: true,
isKnown: Promise { <pending> },
resources: [Function],
promise: [Function],
apply: [Function],
get: [Function]
creamy-potato-29402
01/30/2019, 7:07 PMpulumi.all(istio.resources).apply(...
?pulumi.output(istio.resources)
, maybechilly-photographer-60932
01/30/2019, 7:12 PMcreamy-potato-29402
01/30/2019, 7:12 PMchilly-photographer-60932
01/30/2019, 7:14 PMerror: refusing to proceed
creamy-potato-29402
01/30/2019, 7:26 PMpulumi cancel
getResource
chilly-photographer-60932
01/30/2019, 7:26 PMcreamy-potato-29402
01/30/2019, 7:27 PMpulumi cancel
doesn’t work?chilly-photographer-60932
01/30/2019, 7:28 PMOutput {
__pulumiOutput: true,
isKnown: Promise { <pending> },
resources: [Function],
promise: [Function],
apply: [Function],
get: [Function] }
creamy-potato-29402
01/30/2019, 7:29 PMchilly-photographer-60932
01/30/2019, 7:29 PMconsole.log(pulumi.output(istio.resources));
creamy-potato-29402
01/30/2019, 7:30 PMchilly-photographer-60932
01/30/2019, 7:30 PMconst istio = createIstio(cluster);
console.log(pulumi.output(istio.resources));
const i = istio.getResource(
"v1/Service",
"istio-ingressgateway.istio-system.svc.cluster.local"
);
const s = i.apply(u => u.status);
console.log(s);
Cannot read property 'status' of undefined
creamy-potato-29402
01/30/2019, 7:32 PMchilly-photographer-60932
01/30/2019, 7:35 PMconst istio = createIstio(cluster);
pulumi.output(istio.resources).apply(({ a, b }) => console.log(a, b));
creamy-potato-29402
01/30/2019, 7:35 PMgetResource
has failed to return something sensible. That means your second argument is wrong.chilly-photographer-60932
01/30/2019, 7:35 PMpulumi:pulumi:Stack (eks-eks-naveen):
undefined undefined
undefined
creamy-potato-29402
01/30/2019, 7:36 PMchilly-photographer-60932
01/30/2019, 7:36 PMconst istio = createIstio(cluster);
pulumi.output(istio.resources).apply(({ a, b }) => console.log(a, b));
creamy-potato-29402
01/30/2019, 7:37 PMchilly-photographer-60932
01/30/2019, 7:37 PMistio.resources
?creamy-potato-29402
01/30/2019, 7:38 PMchilly-photographer-60932
01/30/2019, 7:39 PMcreamy-potato-29402
01/30/2019, 7:40 PMistio.getResource("v1/Service", "istio-ingressgateway")
istio-ingressgateway
, if that’s what you’re looking for.chilly-photographer-60932
01/30/2019, 7:44 PMcreamy-potato-29402
01/30/2019, 7:47 PMchilly-photographer-60932
01/30/2019, 7:48 PM"istio-system/istio-ingressgateway"
creamy-potato-29402
01/30/2019, 7:54 PMchilly-photographer-60932
01/30/2019, 7:56 PM