aboutsummaryrefslogtreecommitdiff
path: root/weed/shell/command_fs_configure.go
diff options
context:
space:
mode:
authorMatt <washcycle@users.noreply.github.com>2023-04-10 14:24:38 -0500
committerGitHub <noreply@github.com>2023-04-10 12:24:38 -0700
commitda1d3b5a33353a6aca250d5b4ed687f61a1aa45f (patch)
treedc9f81d46a855ea6ca9d796dd20ba3a36306b665 /weed/shell/command_fs_configure.go
parentb5b5c67cf694df2ac5f2dd80173ec68cf2090d03 (diff)
downloadseaweedfs-da1d3b5a33353a6aca250d5b4ed687f61a1aa45f.tar.xz
seaweedfs-da1d3b5a33353a6aca250d5b4ed687f61a1aa45f.zip
adjusted regex to be from 1 to 255 for the value (#4377)
* compatibility patch for csi driver * added namespace to all component parameters * added namespace to all component parameters * dereference in range * added namespace to values.yml defaults * added namespace to s3 component * added helm chart to github pages * added helm chart to github pages * added helm chart to github pages * added helm chart to github pages * added helm chart to github pages * push on all tags * push on all tags * push on all tags * push on all tags * push on all tags * changed helm directory structure * update charts location * fixed dereference * updated permissions * updated permissions * match current action schema * added helm chart liniting CI * modified chart list changed * fixed nodejs warning * standardized a few defaults * added chart dirs * lowerd period seconds for volume startup to test chart lint changes * lowerd period seconds for volume startup to test chart lint changes * test * changed back * adjustment * debug ls statment * removed change detection * remvoed change detection * always lint the charts * added missing ) * fixed typo * added spaces in front of all comments * pdated values.yaml * pdated values.yaml * don't validate maintainers for now * update helm_ci.yml * update helm_ci.yml * update helm_ci.yml * update helm_ci.yml * update helm_ci.yml * - adds helm chart lint on changes - adds test helm chart install on k8s * updated helm chart readme.md * added artifact hub * added artifact hub * added ttl validation * adjusted regex to be from 1 to 255 for the value * added better error message * fixed regex
Diffstat (limited to 'weed/shell/command_fs_configure.go')
-rw-r--r--weed/shell/command_fs_configure.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/weed/shell/command_fs_configure.go b/weed/shell/command_fs_configure.go
index d09ea0882..d8a160e26 100644
--- a/weed/shell/command_fs_configure.go
+++ b/weed/shell/command_fs_configure.go
@@ -105,11 +105,11 @@ func (c *commandFsConfigure) Do(args []string, commandEnv *CommandEnv, writer io
// check ttl
if *ttl != "" {
- regex := "^[1-9][0-9]*[mhdwMy]$"
+ regex := "^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)[mhdwMy]$"
match, _ := regexp.MatchString(regex, *ttl)
if !match {
- return fmt.Errorf("ttl should be of the following format (e.g., 1m, 1h, 1d, 1w, 1y)")
+ return fmt.Errorf("ttl should be of the following format [1 to 255][unit] (e.g., 5m, 2h, 180d, 1w, 2y)")
}
}