Skip to content

Commit

Permalink
Merge pull request kubeagi#398 from 0xff-dev/version-regex
Browse files Browse the repository at this point in the history
chore: add validation rules to the versioneddataset field
  • Loading branch information
bjwswang authored Dec 18, 2023
2 parents 7c9937d + 3413d74 commit 7a8279f
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions api/base/v1alpha1/versioneddataset_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ type VersionedDatasetSpec struct {
Dataset *TypedObjectReference `json:"dataset"`

// Version
// +kubebuilder:validation:Pattern=^v\d+$
Version string `json:"version"`

// FileGroups included in this `VersionedDataset`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ spec:
type: integer
version:
description: Version
pattern: ^v\d+$
type: string
required:
- dataset
Expand Down
2 changes: 1 addition & 1 deletion deploy/charts/arcadia/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: arcadia
description: A Helm chart(KubeBB Component) for KubeAGI Arcadia
type: application
version: 0.1.43
version: 0.1.44
appVersion: "0.0.1"

keywords:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ spec:
type: integer
version:
description: Version
pattern: ^v\d+$
type: string
required:
- dataset
Expand Down

0 comments on commit 7a8279f

Please sign in to comment.