Skip to content

Commit

Permalink
Merge pull request #197 from eromanova/validation
Browse files Browse the repository at this point in the history
Specify minLength validation for deployment's template reference
  • Loading branch information
Kshatrix authored Aug 21, 2024
2 parents fe3576c + f59561e commit 7f7b1b5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions api/v1alpha1/deployment_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ type DeploymentSpec struct {
DryRun bool `json:"dryRun,omitempty"`
// Template is a reference to a Template object located in the same namespace.
// +kubebuilder:validation:Required
// +kubebuilder:validation:MinLength=1
Template string `json:"template"`
// Config allows to provide parameters for template customization.
// If no Config provided, the field will be populated with the default values for
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ spec:
template:
description: Template is a reference to a Template object located
in the same namespace.
minLength: 1
type: string
required:
- template
Expand Down

0 comments on commit 7f7b1b5

Please sign in to comment.