You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit fa1cf77
Browse filesBrowse the repository at this point in the historyBrowse files
fix(seaweedfs): reserve the -public suffix in pool names
A pool's classes take its name as a prefix, so a pool named <x>-public
renders a readwrite BucketAccessClass <ns>-<x>-public with the same
name as pool <x>'s public-read class, and whichever object wins gives
one of the two pools the wrong policy. A pool named public takes
<ns>-public, the instance's own public-read class. The pool name check
already reserves -lock and -readonly for the same reason.
Assisted-by: LLM
Signed-off-by: Mattia Eleuteri <[email protected]>
Copy file name to clipboardExpand all lines: packages/extra/seaweedfs/templates/seaweedfs.yaml
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -32,8 +32,8 @@
32
32
{{- if not (regexMatch "^[a-z0-9]([a-z0-9-]*[a-z0-9])?$" $poolName) }}
33
33
{{- fail (printf "volume.pools key '%s' must be a valid DNS label (lowercase alphanumeric and hyphens, no dots)." $poolName) }}
34
34
{{- end }}
35
-
{{- if or (hasSuffix "-lock" $poolName) (hasSuffix "-readonly" $poolName) }}
36
-
{{- fail (printf "volume.pools key '%s' must not end with '-lock'or '-readonly' (reserved suffixes for COSI resources)." $poolName) }}
35
+
{{- if or (hasSuffix "-lock" $poolName) (hasSuffix "-readonly" $poolName) (hasSuffix "-public" $poolName) (eq "public" $poolName) }}
36
+
{{- fail (printf "volume.pools key '%s' must not be 'public' or end with '-lock', '-readonly' or '-public' (reserved for COSI resources)." $poolName) }}
37
37
{{- end }}
38
38
{{- if not $pool.diskType }}
39
39
{{- fail (printf "volume.pools.%s.diskType is required." $poolName) }}
@@ -52,8 +52,8 @@
52
52
{{- if not (regexMatch "^[a-z0-9]([a-z0-9-]*[a-z0-9])?$" $poolName) }}
53
53
{{- fail (printf "volume.zones.%s.pools key '%s' must be a valid DNS label." $zoneName $poolName) }}
54
54
{{- end }}
55
-
{{- if or (hasSuffix "-lock" $poolName) (hasSuffix "-readonly" $poolName) }}
56
-
{{- fail (printf "volume.zones.%s.pools key '%s' must not end with '-lock'or '-readonly' (reserved suffixes for COSI resources)." $zoneName $poolName) }}
55
+
{{- if or (hasSuffix "-lock" $poolName) (hasSuffix "-readonly" $poolName) (hasSuffix "-public" $poolName) (eq "public" $poolName) }}
56
+
{{- fail (printf "volume.zones.%s.pools key '%s' must not be 'public' or end with '-lock', '-readonly' or '-public' (reserved for COSI resources)." $zoneName $poolName) }}
57
57
{{- end }}
58
58
{{- if not $pool.diskType }}
59
59
{{- fail (printf "volume.zones.%s.pools.%s.diskType is required." $zoneName $poolName) }}
0 commit comments