Kazan.Server.from_app_env(:your_app) |> Kazan.Server.resolve_auth |> Kazan.Client.send
Hi,
i try to connect with Cluster Authentication, Kazan.Server.in_cluster()
i have a good structure in response
%Kazan.Server{
auth: #TokenAuth<...>,
ca_cert: <<...>>,
insecure_skip_tls_verify: nil,
url: "https://XX.XX.XX:443"
}
but when a run a request i have this:
** (ArgumentError) argument error
(stdlib) :ets.lookup_element(:hackney_config, :mod_metrics, 2)
/source/deps/hackney/src/hackney_metrics.erl:27: :hackney_metrics.get_engine/0
/source/deps/hackney/src/hackney_connect.erl:76: :hackney_connect.create_connection/5
/source/deps/hackney/src/hackney_connect.erl:45: :hackney_connect.connect/5
/source/deps/hackney/src/hackney.erl:329: :hackney.request/5
lib/httpoison/base.ex:746: HTTPoison.Base.request/6
lib/kazan/client/imp.ex:68: Kazan.Client.Imp.run/2
not too explicit :/
For debug, i use cluster-admin as service account. And when i curl the API with token and ca_cert, it's works
kazan: 0.10.0
defmodule Watcher do
@moduledoc """
Documentation for Watcher.
"""
use GenServer
def start_link do
Kazan.Apis.Core.V1.list_namespace!(watch: true)
|> Kazan.Watcher.start_link(send_to: self())
end
## Server Callbacks
def init(:ok), do: {:ok, %{}}
def handle_info(message, state) do
IO.puts inspect(message)
{:noreply, state}
end
end
Kazan.Apis.Core.V1.list_namespace!(watch: true) |> Kazan.run!
which times out as well
** (EXIT from #PID<0.214.0>) shell process exited with reason: an exception was raised:
** (MatchError) no match of right hand side value: {:error, %HTTPoison.Error{id: nil, reason: :timeout}}