logo

Beyond Kubebuilder - Generating Entire Kubernetes Controller Implementations

2022-10-26

Authors:   Jay Pipes, Amine Hilaly


Summary

Building a controller factory with code generation tools and automation to keep controllers up to date with evolving API schemas
  • Developers still have a lot of logic to write and implement despite having great tooling
  • Building a controller factory with code generation tools and automation was necessary to avoid manually maintaining and developing artifacts for 200+ AWS services
  • APIs evolve over time and integrating changes to upstream service APIs in a smooth and consistent fashion was a challenge
  • The controller factory takes AWS API models and a generator.yaml configuration file as inputs to generate a full controller implementation
  • Centralizing code through co-generation from a model definition removes a whole classification of common failures and bugs
The AWS Controllers for Kubernetes project had to create a Kubernetes custom controller for each of the AWS services, which would have been a daunting task to manually maintain and develop artifacts for 200+ services. The team built a controller factory with code generation tools and automation to generate a full controller implementation from AWS API models and a generator.yaml configuration file. However, APIs evolve over time, and integrating changes to upstream service APIs in a smooth and consistent fashion was a challenge. The team had to build automation and code generation tools to continually keep the controllers up to date with evolving API schemas.

Abstract

"Tales from the Kubernetes controller factory floor" If you have used the Kubernetes controller-tools and kubebuilder projects to create a custom Kubernetes controller, you already know the immense power of these tools. However, a significant amount of work remains to implement a controller once kubebuilder has produced API types and basic controller scaffolding. What if you had to build dozens of controllers managing thousands of resources? You'd need a factory to produce full controller implementations from API model schemas. Amine and Jay happen to work in such a Kubernetes controller factory! In this talk, they will give you a tour of the Kubernetes controller factory, showing you how to use the API machinery and what dangers linger on the factory floor. They will teach you how to be the most productive worker in the whole factory by building on top of controller-tools and kubebuilder functionality. You will be introduced to open source tools and strategies that make Kubernetes controller factory life safe and enjoyable!

Materials:

Post a comment

Related work

Authors: Rashmi Gottipati, Varsha Prasad Narsing, Tony J, Bryce Palmer, Camila Macedo
2023-04-19

Authors: Amine Hilaly, Scott Rigby, Niki Manoledaki, Somtochi Onyekwere, Soulé Ba
2022-10-26

Authors: Larry Carvalho, Stu Miniman, Marilyn Basanta, Muneyb Minhazuddin
2022-10-26

Authors: Federico Bongiovanni, David Eads, Jeffrey Ying
2022-10-26