Generate Kubernetes API extension resources and code. Usage: controller-gen [flags] Examples: # Generate RBAC manifests and crds for all types under apis/, # outputting crds to /tmp/crds and everything else to stdout controller-gen rbac:roleName= crd paths=./apis/... output:crd:dir=/tmp/crds output:stdout # Generate deepcopy/runtime.Object implementations for a particular file controller-gen object paths=./apis/v1beta1/some_types.go # Generate OpenAPI v3 schemas for API packages and merge them into existing CRD manifests controller-gen schemapatch:manifests=./manifests output:dir=./manifests paths=./pkg/apis/... # Run all the generators for a given project controller-gen paths=./apis/... # Explain the markers for generating CRDs, and their arguments controller-gen crd -ww # Generate applyconfigurations for CRDs for use with Server Side Apply. They will be placed # into a "applyconfiguration/" subdirectory controller-gen applyconfiguration paths=./apis/... Flags: -h, --detailed-help count print out more detailed help (up to -hhh for the most detailed output, or -hhhh for json output) --help print out usage and a summary of options --load-build-tags strings build tags to use when loading Go packages (default [ignore_autogenerated]) --version show version -w, --which-markers count print out all markers available with the requested generators (up to -www for the most detailed output, or -wwww for json output) Options generators +applyconfiguration[:externalApplyConfigurations=<[]string>][,headerFile=][,omitToolVersion=] package generates code containing apply configuration type implementations. +crd[:allowDangerousTypes=][,crdVersions=<[]string>][,deprecatedV1beta1CompatibilityPreserveUnknownFields=][,generateEmbeddedObjectMeta=][,headerFile=][,ignoreUnexportedFields=][,maxDescLen=][,omitToolVersion=][,year=] package generates CustomResourceDefinition objects. +object[:headerFile=][,year=] package generates code containing DeepCopy, DeepCopyInto, and +rbac[:fileName=][,headerFile=],roleName=[,year=] package generates ClusterRole objects. +schemapatch[:generateEmbeddedObjectMeta=],manifests=[,maxDescLen=] package patches existing CRDs with new schemata. +webhook[:headerFile=][,year=] package generates (partial) {Mutating,Validating}WebhookConfiguration objects. generic +paths=<[]string> package represents the package roots that controller-gen uses as input output rules (optionally as output::...) +output:stdout package outputs everything to standard-out, with no separation. +output:none package skips outputting anything. +output:dir= package outputs each artifact to the given directory, regardless +output:artifacts[:code=],config= package outputs artifacts to different locations, depending on