All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Added telemetry events to the Operator module - #244
Bonny.Axn.register_descendant/3
- Add optiongroup
to define in what group to apply a descendant and apply descendants in groups.
- BONNY_OPERATOR_NAME env var is not a reference
- Start leader election by default - #195
mix bonny.gen.manifest
- Merge RBAC rules for the same resources - #213- Compile time dependency at runtime - #212
- Leader Election: Add missing RBAC permission to access leases - #207
- Simple leader election for running multiple replicas (BETA) - #195
- Fix for an issue reported in #180 already: Add operator name as env variable to deployment.
- Upgrade k8s to 2.1.1
Bonny.Pluggable.Finalizer
- Remove finalizers from resource if they need to be removed.Bonny.Axn
- Regression where descendants were not applied - #192, #191
This release updates its dependency on k8s
to a new major version (2.x
). If
you're using k8s
directly in your code, you should have added it explicitely
to your dependencies in mix.exs
and this update will fail until you update
that dependency manually. If you're using k8s
directly in your code but you
haven't added it explicetly to your list of dependencies, you might get
surprises as 2.x
comes with (yet few) breaking changes.
- Prevent duplicate descendants
- Upgraded k8s dependency to 2.x. #173
Bonny.Pluggable.AddMissingGVK
- A pluggable step for adding missing GVK information to resources - #184, #183- Helpers to define conditions on custom resources. #188
Bonny.API.Version.add_conditions/1
- Helper to define a schema for conditions on the CRDBonny.Axn.set_condition/4
- Helper to set a condition on a resource
Bonny.Pluggable.Finalizer
- A pluggable step to define and implement finalizers, #6, #189Bonny.Axn.register_after_processed/2
- Registers a callback to be invoked at the very end of an action event's processing by the operator
- Initialized application calls the wrong function to initialize conn - #181
- Don't add operator to supervision tree in
:test
env per default - #182
With Version 1.0.0, Bonny got a thorough refactoring. Besides this changelog, you might consider the several guides (e.g. the migration guide)
Bonny.Operator
was introduced as an entry point to the watching and handling of processes. Your controllers are not more added to the supervision tree by bonny. Instead you must create an operator and add that to your application's supervision tree.- The
Pluggable
(thinkPlug
) library is used withBonny.Axn
as token to processADDED
,MODIFIED
,DELETED
and reconciliation events byPluggable
pipelines. Bonny.ControllerV2
was introduced as a successor toBonny.Controller
. It leveragesPluggable.StepBuilder
(thinkPlug.Builder
) to build a pluggable pipeline.Bonny.Event
andBonny.EventRecorder
were introducd for Kubernetes event creation (#156, #5)
- Allows for better CRD and API version definitions
- With a
Pluggable
architecture, controllers are much easier to test (Think ofPlug.Conn
tests) - The
Pluggable
architecture makes your processing pipelines composable and simpler to customize/extend - Decoupling of manifest generation and action event processing
- Internally, the amount of macros was reduced which makes Bonny easier to understand and maintain
Bonny.Mix.Operator
- fix manifest generation: remove version from apiGroup in ClusterRole.
Bonny.Pluggable.AddManagedByLabelToDescendants
- Adds theapp.kubernetes.io/managed-by
label to all descendants registered within the pipeline.- Allow
nil
and{controller :: module(), init_opts :: keyword()}
in the operator'scontrollers/2
callback.
K8sConn
- Implement spec correctly.
Bonny.Axn.apply_descendants/N
,Bonny.Axn.apply_status/N
- Raise upon error.
- Better logs in case of errors while applying status, descendants or events
- Integration tests for these logs
With Version 1.0.0, Bonny got a thorough refactoring. Besides this changelog, you might consider the several guides (e.g. the migration guide)
Bonny.Operator
was introduced as an entry point to the watching and handling of processes. Your controllers are not more added to the supervision tree by bonny. Instead you must create an operator and add that to your application's supervision tree.- The
Pluggable
(thinkPlug
) library is used withBonny.Axn
as token to processADDED
,MODIFIED
,DELETED
and reconciliation events byPluggable
pipelines. Bonny.ControllerV2
was introduced as a successor toBonny.Controller
. It leveragesPluggable.StepBuilder
(thinkPlug.Builder
) to build a pluggable pipeline.Bonny.Event
andBonny.EventRecorder
were introducd for Kubernetes event creation (#156, #5)
Why this refactoring?
- Allows for better CRD and API version definitions
- With a
Pluggable
architecture, controllers are much easier to test (Think ofPlug.Conn
tests) - The
Pluggable
architecture makes your processing pipelines composable and simpler to customize/extend - Manifest generation and event processing were decoupled
- Internally, the amount of macros was reduced which makes Bonny easier to maintain
Bonny.Pluggable.SkipObservedGenerations
- halts the pipelines for a defined list of actions if the observed generation equals the resource's generation.Bonny.Pluggable.ApplyDescendants
- applies all the descendants added to the%Bonny.Axn{}
struct.Bonny.Pluggable.ApplyStatus
- applies the status of the given%Bonny.Axn{}
struct to the status subresource.Bonny.Pluggable.Logger
- logs an action event and when status, descendants and events are applied to the cluster. If desired, it makes sense to be placed as first step in your operator pipeline but can also be added to a controller pipeline.Bonny.Resource.add_owner_reference/3
used to add the owner reference to resources created by the controller. (#147)- An integration test suite was added that runs tests against a "real" kubernetes cluster on the CI pipeline (#146, #84)
- Mix task for initializing a new operator
mix bonny.init
(#160, #67)
Bonny.Controller
was deprecated in favor of the new design withBonny.Operator
andBonny.ControllerV2
- Use name of application in Deployments instead of service account name. (#142)
- Add missing
priv
folder to package
Version 0.5.0 comes with some major changes. Please read through the migration guide before upgrading.
Bonny.Server.AsyncStreamRunner
to run streams in a separate processBonny.Sys.Telemetry
definestelemetry
spans and events
Bonny.Server.Watcher
andBonny.Server.Reconciler
were rewritten completely. They now prepare streams which are to be run withBonny.Server.AsyncStreamRunner
- Dependency
k8s
was updated to version~> 1.1
and code was refactored accordingly
Bonny.Sys.Event
was deprecated in favor ofBonny.Sys.Telemetry
- @impl to macros for clean compilation
- error handling for mid-stream errors
- Configure watched namespace via config.exs or BONNY_POD_NAMESPACE
- BONNY_POD_NAMESPACE supports "magic" value "ALL"
- Support for reconciling/watching
core
resources
- Basic integration w/ Notion for telemetry
- Bonny.Server.Reconciler continually process a list operation
- Bonny.Server.Scheduler write custom kubernetes schedulers
- Added Bonny.PeriodicTask for scheduling periodically executed functions
- Dockerfile gen uses OTP releases
- Removed
reconcile_batch_size
- Add additional printer columns
- Bonny.Naming module
- .credo.exs
- Bonny.Watcher and Bonny.Reconciler telemetry events
- Support for a reconcile/1 callback
reconcile_every
config option to schedule how often to run reconciliationreconcile_batch_size
to set the size of the HTTP GET limit when fetching batches of items to reconcile- Added
{:error, binary}
as a return value of Controller lifecycle methods - Implemented
:telemetry
library Bonny.Sys.Event.events/0
exposes list of telemetry eventsmix bonny.gen.manifest --local
for building manifests w/o a Deployment for local testingcluster_name: :default
config options. Now uses k8s cluster registration configuration.
- Async watcher event dispatch
- Replaced
HTTPoison
with k8s
- Receiving :DOWN messages no longer crashes Watcher #20
- Issue with partially received events #43
- Fix invalid singular name generation from module names "MyMod" -> my_mod; "MyMod" -> mymod
- Renamed
group_version
->api_version
- Renamed Bonny.CRD.plural/1 ->
Bonny.CRD.kind/1
Bypass
from test suiteImpl.parse_metadata/1
kubeconf_file
andkubeconf_opts
config options
- Replaced
k8s_conf
library with k8s.
- Initial public release.
- Controller lifecycle implementation.
- CRD Watcher.
- mix task: controller generator
- mix task: dockerfile generator
- mix task: k8s manifest generator