This article by Ahmet Alp Balkan highlights common pitfalls in generating Kubernetes CustomResourceDefinitions (CRDs) with controller-gen, emphasizing the importance of explicit validation, careful use of required and optional markers, and understanding how Go’s zero values interact with CRD schemas. Through practical examples, it warns developers about issues like unvalidated nested fields, marker typos, and the challenges of defaulting and validation, offering actionable advice to avoid subtle bugs in custom Kubernetes APIs.
https://ahmet.im/blog/crd-generation-pitfalls/index.html
Post #2209
15.1K