Skip to content

Commit e9860e6

Browse files
committed
alignment error
1 parent c2699c0 commit e9860e6

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

docs/book/src/reference/markers.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,15 @@ a marker name, optionally followed by some marker specific configuration:
1717

1818
<aside class="note">
1919
<h1>difference between `// +optional` and `// +kubebuilder:validation:Optional`</h1>
20-
controller-gen supports both (see the output of `controller-gen crd -www`). `+kubebuilder:validation:Optional` and `+optional` can be applied to fields.
2120

22-
But `+kubebuilder:validation:Optional` can also be applied at the package level such that it applies to every field in the package.
21+
Controller-gen supports both (see the output of `controller-gen crd -www`). `+kubebuilder:validation:Optional` and `+optional` can be applied to fields.
2322

24-
If you're using controller-gen only then they're redundant, but if you're using other generators or you want developers that need to build their own clients for your API, you'll want to also include `+optional`.
23+
But `+kubebuilder:validation:Optional` can also be applied at the package level such that it applies to every field in the package.
24+
25+
If you're using controller-gen only then they're redundant, but if you're using other generators or you want developers that need to build their own clients for your API, you'll want to also include `+optional`.
26+
27+
The most reliable way in 1.x to get `+optional` is `omitempty`.
2528

26-
The most reliable way in 1.x to get `+optional` is `omitempty`.
2729
</aside>
2830

2931
See each subsection for information about different types of code and YAML

0 commit comments

Comments
 (0)