Error Back-off with Controller Runtime

Kubebuilder provides tooling to help get you started quickly writing operators for Kubernetes, and builds on top of controller-runtime. I’ve been looking at how errors are handled in a couple of Kubebuilder projects recently. I’d seen a couple of GitHub issues that mentioned that controller-runtime has back-off behaviour for errors so started looking through the docs to find out more, but didn’t find anything. If I get chance, I’d like to find a suitable place to send a PR to add some details in the docs, but for now I’m collating my notes here as a reference for future me! [Read More]

Using Event Filters with Kubebuilder

Part 2: Filtering Updates

Background As I recently posted, I’ve worked on a couple of projects that have involved using Kubebuilder to create Kubernetes operators. In last post we looked at using event filters to prevent delete notifications being processed by the reconciliation loop. Another thing I’ve noticed as I’ve been developing operators is that the flow when an object is created is typically: receive create notification, take some action, update the object Status property. [Read More]

Using Event Filters with Kubebuilder

Part 1: Filtering Deletes

UPDATE (2020/01/08 ): After testing this in another project I discovered that the NotFound checking is still required in the case where the reconciliation has been requeued and the object is deleted in the interim period. Even with this code, I still prefer not having the NotFound output in my logs for the default case. Background A couple of projects recently have involved using Kubebuilder to create Kubernetes operators. Kubebuilder scaffolds out a go application and then lets you focus on writing the logic of the reconciliation loop which is the core part of the operator. [Read More]