doc.go 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /*
  2. Copyright 2019 The Kubernetes Authors.
  3. Licensed under the Apache License, Version 2.0 (the "License");
  4. you may not use this file except in compliance with the License.
  5. You may obtain a copy of the License at
  6. http://www.apache.org/licenses/LICENSE-2.0
  7. Unless required by applicable law or agreed to in writing, software
  8. distributed under the License is distributed on an "AS IS" BASIS,
  9. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10. See the License for the specific language governing permissions and
  11. limitations under the License.
  12. */
  13. // Package markers defines markers for generating schema valiation
  14. // and CRD structure.
  15. //
  16. // All markers related to CRD generation live in AllDefinitions.
  17. //
  18. // # Validation Markers
  19. //
  20. // Validation markers have values that implement ApplyToSchema
  21. // (crd.SchemaMarker). Any marker implementing this will automatically
  22. // be run after the rest of a given schema node has been generated.
  23. // Markers that need to be run before any other markers can also
  24. // implement ApplyFirst, but this is discouraged and may change
  25. // in the future.
  26. //
  27. // All validation markers start with "+kubebuilder:validation", and
  28. // have the same name as their type name.
  29. //
  30. // # CRD Markers
  31. //
  32. // Markers that modify anything in the CRD itself *except* for the schema
  33. // implement ApplyToCRD (crd.CRDMarker). They are expected to detect whether
  34. // they should apply themselves to a specific version in the CRD (as passed to
  35. // them), or to the root-level CRD for legacy cases. They are applied *after*
  36. // the rest of the CRD is computed.
  37. //
  38. // # Misc
  39. //
  40. // This package also defines the "+groupName" and "+versionName" package-level
  41. // markers, for defining package<->group-version mappings.
  42. package markers