https://pulumi.com logo
Title
l

little-river-49422

02/16/2019, 7:30 PM
its like next level docs, what do I infer from this? 🙂
c

creamy-potato-29402

02/16/2019, 8:05 PM
@little-river-49422 these docs come from the Kubernetes OpenAPI spec. It’s basically a
v1/List
of only `Service`s
l

little-river-49422

02/16/2019, 8:05 PM
yeah, i understand that, but how do I use it, lol
c

creamy-potato-29402

02/16/2019, 8:05 PM
Confusingly, you can’t give it a
namespace
because it is not instantiated by the API server.
Typically `List`s are used to return objects when you do a
kubectl get
for example
If you submit it to the API server, it will instantiate everything in the list, but not the list itself.
l

little-river-49422

02/16/2019, 8:07 PM
so i need to put something inside the items? but what?
c

creamy-potato-29402

02/16/2019, 8:07 PM
`Service`s
the items need to be
Service
.
l

little-river-49422

02/16/2019, 8:08 PM
like, a pulumi resource?
c

creamy-potato-29402

02/16/2019, 8:08 PM
whatever you’d pass to
new core.v1.Service
l

little-river-49422

02/16/2019, 8:08 PM
how do I do it without pulumi creating the actual service?
c

creamy-potato-29402

02/16/2019, 8:08 PM
a list of those goes in
items
I’m confused, what are you trying to do, now?
l

little-river-49422

02/16/2019, 8:10 PM
ok, like you said, list is used to retrieve stuff, right? I'm trying to find the external IP of the nginx ingress service, because its not being created by pulumi, its being created by a helm chart during cluster provisioning
c

creamy-potato-29402

02/16/2019, 8:10 PM
It can be used to retrieve stuff, but if you do
new ServiceList
with Pulumi, it tells Pulumi to create all the `Service`s inside.
Or I should say:
kubectl get svc
happens to return a
ServiceList
. But if you
kubectl apply
a
ServiceList
, it will create/update those `Service`s
l

little-river-49422

02/16/2019, 8:12 PM
ok, so this particular thing in python sdk is used to create services, not get them? so there is no method to get data from k8s in python sdk?
c

creamy-potato-29402

02/16/2019, 8:13 PM
Come to think of it we should probably remove the
List
types. In practice I don’t think they’re useful in the context of Pulumi. In an
apply
they are really only useful if you have a single JSON document and you want to create a bunch of services.
I’m not sure, let me check if we implement
.get
l

little-river-49422

02/16/2019, 8:13 PM
i dont think i see any gets in the reference
only list, i thought lists are for that =\
c

creamy-potato-29402

02/16/2019, 8:15 PM
hmm, yes, this is an easy feature to add, we can probably fix this next week.
let me file an issue
l

little-river-49422

02/16/2019, 8:19 PM
ok, thanks. i guess I'll just wait for now 😉
i'll use kubectl to retrieve it, probably