Why Are We Copying and Pasting So Much?
If youve contributed to the one of the Kubernetes controllers or built a custom controller (such as an operator), youve probably had to copy a large amount of boilerplate code. Other bits of the con …
Talk Title | Why Are We Copying and Pasting So Much? |
Speakers | Solly Ross (Software Engineer, Google), Phillip Wittrock (Software Engineer, Google) |
Conference | KubeCon + CloudNativeCon North America |
Conf Tag | |
Location | Seattle, WA, USA |
Date | Dec 9-14, 2018 |
URL | Talk Page |
Slides | Talk Slides |
Video | |
If you’ve contributed to the one of the Kubernetes controllers or built a custom controller (such as an operator), you’ve probably had to copy a large amount of boilerplate code. Other bits of the controllers may look similar, but have small variations, making it difficult to separate what is bespoke and what is common logic. The copy/paste approach makes code harder to refactor, understand, and debug. Additionally, neither bug fixes nor improvements to the original are not propagated to the copies. So what can we about it? Enter controller-runtime, a new foundation library for the next generation of controllers which replaces the boilerplate code with a few function calls. In this session, we’ll look at common controller patterns across both the Kubernetes codebase broader ecosystem, identifying the common elements, simplifying them with the utilities in controller-runtime.