View Source API Reference bonny v1.4.0
Modules
Extend the Kubernetes API and implement CustomResourceDefinitions lifecycles in Elixir.
A Custom Resource Definition.
Defines the API Endpoint for a Kubernetes resource.
Describes an API version of a custom resource.
Describes a resource action event.
Error raised when trying to register a descendant or apply the descendants when already applied.
Error raised when trying to register an event or emit evnts when already emitted.
Error raised when trying to update or apply an already applied status
Conveniences for testing Axn steps.
Represents the spec
portion of a Kubernetes CustomResourceDefinition manifest.
Operator configuration interface
Bonny.Controller
defines controller behaviours and generates boilerplate for generating Kubernetes manifests.
Controllers handle action events observed by a resource watch query. Controllers must be registered at the operator together with the resource watch query. The operator will then delegate events observed by that query for processing to this controller
Represents a kubernetes event. Documentation: https://kubernetes.io/docs/reference/kubernetes-api/cluster-resources/event-v1/
Records kubernetes events regarding objects controlled by this operator.
Encapsulates Kubernetes resource manifests for an operator
Naming functions
Defines a Bonny operator.
The leader uses a Kubernetes Lease to make sure the operator only runs on one single replica (the leader) at the same time.
Register periodically run tasks. Use for running tasks as a part of reconciling a CRD with a lifetime, duration, or interval field.
Adds the app.kubernetes.io/managed-by
label to all descendants registered
within the pipeline.
The Kubernetes API sometimes doesn't set the fields apiVersion
and kind
on
items of a list operation. E.g. if you use K8s.Client
to get a list of
deployments, the deployments won't contains those two fields. This is being
discussed on https://github.com/kubernetes/kubernetes/issues/3030.
Applies all the descendants added to the %Bonny.Axn{}
struct.
Applies the status of the given %Bonny.Axn{}
struct to the status subresource.
Declare a finalizer and its implementation.
A pluggable step for logging basic action event information in the format
Halts the pipelines for a defined list of actions if the observed generation equals the resource's generation. It also sets the observed generation value before applying the resource status to the cluster.
Helper functions for dealing with kubernetes resources.
Runs the given stream in a separate process. Prepare your stream and add this Runner to your supervision tree in order to control it (e.g. restart after the stream ends).
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.
Kubernetes custom scheduler interface. Built on top of Reconciler
.
Kubernetes binding interface.
Creates the stream for watching resources in kubernetes and prepares its processing.
Telemetry event definitions for this library
Attaches telemetry events to the Elixir Logger
Telemetry event definitions for this library
This is a goofy config, but it makes this work in dev w/o having to POST an Example CRD.
Mix task helpers
Mix Tasks
Generates a new CRD controller
Generates a Dockerfile for this operator
Generates the Kubernetes YAML manifest for this operator
Initialized an operator wiht bonny.