Use kubebuilder enum for new policy fields

Signed-off-by: Sergen Yalçın <yalcinsergen97@gmail.com>
This commit is contained in:
Sergen Yalçın 2022-06-13 18:11:54 +03:00
parent 5770f19db9
commit afe248692b
No known key found for this signature in database
GPG Key ID: 1EC8D6C7CC79DB6B
1 changed files with 2 additions and 0 deletions

View File

@ -84,6 +84,7 @@ type Policy struct {
// the corresponding field is not present. Use 'Always' to resolve the
// reference on every reconcile.
// +optional
// +kubebuilder:validation:Enum=Always
Resolve *ResolvePolicy `json:"resolve,omitempty"`
// Resolution specifies whether resolution of this reference is required.
@ -92,6 +93,7 @@ type Policy struct {
// a no-op if it cannot be resolved.
// +optional
// +kubebuilder:default=Required
// +kubebuilder:validation:Enum=Required;Optional
Resolution *ResolutionPolicy `json:"resolution,omitempty"`
}