https://pulumi.com logo
#general
Title
# general
g

gray-city-50684

08/22/2018, 6:17 PM
What is the correct way to "hook up" an output value from an object like that, as the input to another?
m

microscopic-florist-22719

08/22/2018, 6:18 PM
What you have there looks correct. Are you seeing this issue during an
update
or a
preview
?
(also cc @creamy-potato-29402, who can comment a bit more knowledgeably on the contents of
spec
)
c

creamy-potato-29402

08/22/2018, 6:19 PM
I have no idea what the Azure die of this looks like, but what is
spec
? Is that
service.spec
?
I’m guessing you actually want
.status.loadBalancer.ingress[*].ip
g

gray-city-50684

08/22/2018, 6:24 PM
spec is: readonly spec: pulumi.Output<outputApi.core.v1.ServiceSpec>;
nginxControllerService is created like this:
export const nginxControllerService = nginxIngressCG.getResource("v1/Service", "bznginx-nginx-ingress-controller");
@creamy-potato-29402 thanks it worked!
c

creamy-potato-29402

08/22/2018, 6:36 PM
woo!
g

gray-city-50684

08/22/2018, 6:36 PM
could you explain to me why do I need to use status here, instead of spec?
c

creamy-potato-29402

08/22/2018, 6:36 PM
The Kubernetes API does not populate the loadbalancer IPs in spec.
It populates them in
status
.
g

gray-city-50684

08/22/2018, 6:36 PM
when I checked the examples, to get to the ClusterIp for example, it is like this:
c

creamy-potato-29402

08/22/2018, 6:37 PM
clusterIP
is actually the cluster-internal IP address.
g

gray-city-50684

08/22/2018, 6:37 PM
export const argoUiIp = argoUiService.spec.apply(spec => spec.clusterIP);
but I can access that through the spec
why not externalIP?
(which is set, I checked it with kubectl)
c

creamy-potato-29402

08/22/2018, 6:37 PM
You can actually set
clusterIP
in various ways, which is why it’s in
spec
.
It happens to be auto-populated most of the time.
In contrast, the loadbalancer-allocated IP addresses are only set by the service controller.
So they put that in
status
, since that’s where values that are only set by the service controller go.
It’s pretty confusing, IMO
g

gray-city-50684

08/22/2018, 6:38 PM
yep 🙂
c

creamy-potato-29402

08/22/2018, 6:39 PM
nodePort
is also famously in
spec
.
For the same reason.
g

gray-city-50684

08/22/2018, 6:39 PM
and this code I made, will this wait until the LB ip is assigned?
c

creamy-potato-29402

08/22/2018, 6:39 PM
It will.
If they
.spec.type
is
LoadBalancer
This is built into the Pulumi notion of a service.
g

gray-city-50684

08/22/2018, 6:40 PM
it is
cool - I really like this tool you guys are building 🙂
c

creamy-potato-29402

08/22/2018, 6:41 PM
woo!
btw
check out
0.15.2-rc1
it has been released and it fixes the bugs you brought up.
it is my first time cutting a release though so I am hoping I did not screw it up. 🙂
g

gray-city-50684

08/22/2018, 6:42 PM
😄
I guess I'll do that from home, they'll close the building on me soon 🙂
c

creamy-potato-29402

08/22/2018, 6:43 PM
lol
Do note, btw, @gray-city-50684 that minikube does not support service type
LoadBalancer
so if you try to boot this up on minikube, this will hang forever.
Pulumi expects it to allocate an IP, and it never does.
g

gray-city-50684

08/22/2018, 6:45 PM
this I actually knew 🙂 do you know if the Kubernetes in Docker for Windows / Mac has the same limitation?
I guess it would...
c

creamy-potato-29402

08/22/2018, 6:46 PM
It has a different limitation. It allocates
ingress[*].host
rather than
ingress[*].ip
we currently do not support this however.
g

gray-city-50684

08/22/2018, 6:47 PM
btw: I checked on npmjs.com, the latest created release is 0.15.1-rc1
is that the one you made?
11 mins ago
c

creamy-potato-29402

08/22/2018, 6:48 PM
😞
i messed it up will fix later
g

gray-city-50684

08/22/2018, 6:49 PM
but the content is good, right?
so I can just use it
?
c

creamy-potato-29402

08/22/2018, 6:53 PM
@gray-city-50684 yes, yes, I see what I did now.
git tag -a -m "v0.15.2-rc1" v0.15.1-rc1
🤦
I’m an idiot.
g

gray-city-50684

08/22/2018, 6:55 PM
it's just a very small mistake, don't sweat it
c

creamy-potato-29402

08/22/2018, 6:55 PM
So yes, that’s correct.
those bits are what you want.
g

gray-city-50684

08/22/2018, 6:55 PM
I'll give it a try soon
thx again!
c

creamy-potato-29402

08/22/2018, 6:58 PM
ok releasing
git tag -a -m "v0.15.2-rc2" v0.15.2-rc2
@gray-city-50684 we actually decided to release it a 0.16.0, just FYI