Skip to content

Refactor for multiple cloud provider support #3

@coryodaniel

Description

@coryodaniel
  • move id/1 to an callback
  • Refactor conn/0 token/0 log_http_error/1 into GKE adapter adapter to pave way for pluggable support. conn should be optional to all functions currently accepting it, if not provided, the adapter should call its conn/0 function.
  • goth should be an optional dependency and should not automatically be started unless a GCP token is present.
  • PoolPolicy spec should be extended to accept spec.provider with the only current valid value gcp
  • NodePool should have a provider field.
  • Add API for registering an adapter at runtime and looking them up by name
  • Ballast.Adapters.Local for development/test
  • Move adapter specific HTTP errors into adapter, ie: Tesla.Env in node_pool.ex
defmodule Adapter do
  def register(name, mod), do: "..."
  def lookup(name), do: mod
end

Adapter.register("gcp", Ballast.Adapters.GKE)
Adapter.lookup("gcp") #=> Ballast.Adapters.GKE

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions