Designing an API and a CRD
As we covered in Chapter 1, Introducing the Operator Framework, and Chapter 2, Understanding How Operators Interact with Kubernetes, the use of a CRD is a defining characteristic of Operators to create an object for users to interact with. This object creates an interface for controlling the Operator. In this way, the Custom Resource (CR) object is a window into the Operator's main functions.
As with any good window, the Operator's CRD must be built well. It must be clear enough to expose the details of the Operator while being secure enough to keep out harsh weather and burglars, and as with a window, the CRD's design should follow local building codes to ensure that it is built up to the expected standards of the environment. In our case, those building codes are the Kubernetes API conventions.
Following the Kubernetes API design conventions
Even though a CRD is a custom object that can be created by anyone, there are still best...