coryodaniel/k8s

K8s.Conn.Config does not exist

cjbottaro opened this issue · 4 comments

Note: Examples assume a K8s.Conn was configured named "test". See K8s.Conn.Config.

I can see that K8s.Client.run/1 exists and takes only an operation and not a conn. Then there is documentation that suggests it's possible configure a default conn. But K8s.Conn.Config does not exist, nor can I find any documentation on how to configure a default conn.

I'm using version 2.2.0.

Hi @cjbottaro

The reference to K8s.Conn.Config in the docs must be wrong. There's really no such module.
You need a conn. Either you pass it to K8s.Client.run/2 or you pass it inside the operation you pass to K8s.Client.run/1:

An example for usage of K8s.Client.run/1:

{:ok, conn} = K8s.Conn.from_file(...)
K8s.Client.get("v1", "ConfigMap", namespace: "default", name: "my-config-map")
|> K8s.Client.put_conn(conn)
|> K8s.Client.run()

I can't find any documentation that suggests it's possible to configure a default conn. What are you trying to do? What do you mean by "default config"?

Shoot, I should have provided a link instead of a quote. I can't find it anymore either. Sorry about that!

My fault, I have "fixed" this together with #250 in #251 where I might have removed that faulty comment. Forgot to update this ticket, sorry.