Documentation
¶
Index ¶
Constants ¶
View Source
const ( // KubeAPIApprovedAnnotation is an annotation that must be set to create a CRD for the k8s.io, *.k8s.io, kubernetes.io, or *.kubernetes.io namespaces. // The value should be a link to a URL where the current spec was approved, so updates to the spec should also update the URL. // If the API is unapproved, you may set the annotation to a string starting with `"unapproved"`. For instance, `"unapproved, temporarily squatting"` or `"unapproved, experimental-only"`. This is discouraged. KubeAPIApprovedAnnotation = "api-approved.kubernetes.io" )
Variables ¶
This section is empty.
Functions ¶
func Capitalize ¶
func GenerateValue ¶
Types ¶
type Generator ¶
type Generator struct {
// AllowDangerousTypes allows types which are usually omitted from CRD generation
// because they are not recommended.
//
// Currently the following additional types are allowed when this is true:
// float32
// float64
//
// Left unspecified, the default is false
AllowDangerousTypes *bool `marker:",optional"`
// MaxDescLen specifies the maximum description length for fields in CRD's OpenAPI schema.
//
// 0 indicates drop the description for all fields completely.
// n indicates limit the description to at most n characters and truncate the description to
// closest sentence boundary if it exceeds n characters.
MaxDescLen *int `marker:",optional"`
// HeaderFile specifies the header text (e.g. license) to prepend to generated files.
HeaderFile string `marker:",optional"`
// Year specifies the year to substitute for " YEAR" in the header file.
Year string `marker:",optional"`
// genInstall let this generator generate install function.
GenInstall bool
// genCRD let this generator generate CustomResourceDefinition object.
GenCRD bool
}
Generator generates Install function or CustomResourceDefinition objects.
func (Generator) CheckFilter ¶
func (Generator) CheckFilter() loader.NodeFilter
Click to show internal directories.
Click to hide internal directories.