- 
                Notifications
    You must be signed in to change notification settings 
- Fork 1.4k
Description
What would you like to be added (User Story)?
Godocs for api types in core k8s normally start with the serialised version for better readability in e.g. kubectl describe.
Example:
	// emptyDir represents a temporary directory that shares a pod's lifetime.
	// More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir
	// +optional
	EmptyDir *EmptyDirVolumeSource `json:"emptyDir,omitempty" protobuf:"bytes,2,opt,name=emptyDir"`Source: https://github.com/kubernetes/api/blob/master/core/v1/types.go#L60-L63
This issue tracks refactoring all relevant godocs of our API types.
Maybe there could also be a linter to enforce this.
Detailed Description
I can't see it explicitly called out in the API conventions from upstream, but, take a look at the godoc across the core types (and I know the upstream API reviewers enforce this from experience), kubernetes/api@master/core/v1/types.go, all of the godocs on fields start with the json tag version of the field name, so that when docs are generated, they represent the serialised versions of the strings
Anything else you would like to add?
xref: Discussion at #11166 (comment)
Label(s) to be applied
/kind api