Skip to content

Commit

Permalink
add validation to feastProject field
Browse files Browse the repository at this point in the history
Signed-off-by: Tommy Hughes <[email protected]>
  • Loading branch information
tchughesiv committed Oct 2, 2024
1 parent e0d2d56 commit 62e7e7d
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
4 changes: 3 additions & 1 deletion infra/feast-operator/api/v1alpha1/featurestore_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ type FeatureStoreSpec struct {
// INSERT ADDITIONAL SPEC FIELDS - desired state of cluster
// Important: Run "make" to regenerate code after modifying this file

// FeastProject ...
// +kubebuilder:validation:MaxLength=16
// +kubebuilder:validation:Pattern="^[a-zA-Z0-9]+$"
// FeastProject is the Feast project id. This can be any alphanumeric string up to 16 characters.
FeastProject string `json:"feastProject"`
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ metadata:
}
]
capabilities: Basic Install
createdAt: "2024-10-01T21:27:54Z"
createdAt: "2024-10-02T20:24:54Z"
operators.operatorframework.io/builder: operator-sdk-v1.37.0
operators.operatorframework.io/project_layout: go.kubebuilder.io/v4
name: feast-operator.v0.40.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ spec:
description: FeatureStoreSpec defines the desired state of FeatureStore
properties:
feastProject:
description: FeastProject ...
description: FeastProject is the Feast project id. This can be any
alphanumeric string up to 16 characters.
maxLength: 16
pattern: ^[a-zA-Z0-9]+$
type: string
required:
- feastProject
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ spec:
description: FeatureStoreSpec defines the desired state of FeatureStore
properties:
feastProject:
description: FeastProject ...
description: FeastProject is the Feast project id. This can be any
alphanumeric string up to 16 characters.
maxLength: 16
pattern: ^[a-zA-Z0-9]+$
type: string
required:
- feastProject
Expand Down

0 comments on commit 62e7e7d

Please sign in to comment.