View Source Bonny.Server.Scheduler.Binding (bonny v1.4.0)
Kubernetes binding interface.
Currently undocumented in Kubernetes docs.
Links
Summary
Functions
Creates the pod's /binding subresource through K8s.
Returns a map representing a Binding
kubernetes resource
Functions
@spec create(K8s.Conn.t(), map(), map()) :: K8s.Client.Runner.Base.result_t()
Creates the pod's /binding subresource through K8s.
Returns a map representing a Binding
kubernetes resource
Example
iex> pod = %{"metadata" => %{"name" => "nginx", "namespace" => "default"}}
...> node = %{"metadata" => %{"name" => "kewl-node"}}
iex> Bonny.Server.Scheduler.Binding.new(pod, node)
%{"apiVersion" => "v1", "kind" => "Binding", "metadata" => %{"name" => "nginx", "namespace" => "default"}, "target" => %{"apiVersion" => "v1", "kind" => "Node", "name" => "kewl-node"}}