vmware-archive / operator-builder

A Kubebuilder plugin to accelerate the development of Kubernetes operators
MIT License
41 stars 6 forks source link

feat: fixes #192 add default values to doc comments #223

Closed scottd018 closed 2 years ago

scottd018 commented 2 years ago

The following will always add default values into the documentation comments, such that the kubectl explain command will always list what the default value is. Below is an example of what is generated from the standalone test:

sdustin-a01:operator-builder-testing sdustin$ kubectl explain webstores.spec.webstore.really.long.path
KIND:     WebStore
VERSION:  apps.acme.com/v1alpha1

RESOURCE: path <Object>

DESCRIPTION:
     <empty>

FIELDS:
   image        <string>
     (Default: "nginx:1.17") Defines the web store image

Signed-off-by: Dustin Scott sdustin@vmware.com