Skip to content

Commit

Permalink
Fix bitwalker#8 - bugs in kubernetes strategy due to v2 changes
Browse files Browse the repository at this point in the history
  • Loading branch information
bitwalker committed Dec 1, 2016
1 parent 96f5e60 commit 8f67d94
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/strategy/kubernetes.ex
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ defmodule Cluster.Strategy.Kubernetes do
@kubernetes_master "kubernetes.default.svc.cluster.local"
@service_account_path "/var/run/secrets/kubernetes.io/serviceaccount"

def start_link(opts), do: GenServer.start_link(__MODULE__, [opts])
def start_link(opts), do: GenServer.start_link(__MODULE__, opts)
def init(opts) do
state = %State{
topology: Keyword.fetch!(opts, :topology),
Expand Down Expand Up @@ -95,11 +95,11 @@ defmodule Cluster.Strategy.Kubernetes do
end

@spec get_nodes(State.t) :: [atom()]
defp get_nodes(%State{topology: topology}) do
defp get_nodes(%State{topology: topology, config: config}) do
token = get_token()
namespace = get_namespace()
app_name = Application.get_env(:libcluster, :kubernetes_node_basename)
selector = Application.get_env(:libcluster, :kubernetes_selector)
app_name = Keyword.fetch!(config, :kubernetes_node_basename)
selector = Keyword.fetch!(config, :kubernetes_selector)
cond do
app_name != nil and selector != nil ->
selector = URI.encode(selector)
Expand Down

0 comments on commit 8f67d94

Please sign in to comment.