What is the correct way to "hook up" an output val...
# general
g
What is the correct way to "hook up" an output value from an object like that, as the input to another?
m
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
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
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
woo!
g
could you explain to me why do I need to use status here, instead of spec?
c
The Kubernetes API does not populate the loadbalancer IPs in spec.
It populates them in
status
.
g
when I checked the examples, to get to the ClusterIp for example, it is like this:
c
clusterIP
is actually the cluster-internal IP address.
g
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
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
yep 🙂
c
nodePort
is also famously in
spec
.
For the same reason.
g
and this code I made, will this wait until the LB ip is assigned?
c
It will.
If they
.spec.type
is
LoadBalancer
This is built into the Pulumi notion of a service.
g
it is
cool - I really like this tool you guys are building 🙂
c
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
😄
I guess I'll do that from home, they'll close the building on me soon 🙂
c
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
this I actually knew 🙂 do you know if the Kubernetes in Docker for Windows / Mac has the same limitation?
I guess it would...
c
It has a different limitation. It allocates
ingress[*].host
rather than
ingress[*].ip
we currently do not support this however.
g
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
😞
i messed it up will fix later
g
but the content is good, right?
so I can just use it
?
c
@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
it's just a very small mistake, don't sweat it
c
So yes, that’s correct.
those bits are what you want.
g
I'll give it a try soon
thx again!
c
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