View Source Bonny.Server.Reconciler behaviour (bonny v0.5.0)
Creates a stream that, when run, streams a list of resources and calls reconcile/1
on the given controller for each resource in the stream in parallel.
example
Example
reconciliation_stream = Bonny.Server.Reconciler.get_stream(controller)
Task.async(fn -> Stream.run(reconciliation_stream) end)
Link to this section Summary
Callbacks
Takes a controller that must define the following functions and returns a (prepared) stream.
Link to this section Callbacks
Takes a controller that must define the following functions and returns a (prepared) stream.
conn/0
- should return a K8s.Conn.t()reconcile_operation/0
- should return a K8s.Operation.t() list operation that produces the stream of resourcesreconcile/1
- takes a map and processes it
Link to this section Functions
@spec get_stream(module(), K8s.Conn.t(), K8s.Operation.t(), keyword()) :: Enumerable.t()