mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-07-06 16:16:31 +00:00
37962e2445
* admin: configure maintenance tasks via admin.toml Maintenance task settings could only be edited in the admin UI and live under <dataDir>/conf, so they silently reverted to defaults whenever the data directory was recreated. An optional admin.toml now declares vacuum, balance, and erasure coding settings; keys set there are written through to the persisted task configs at every startup, overriding UI edits, so the configuration stays declarative. Generate an example with "weed scaffold -config=admin". * vacuum: round min volume age up to whole hours MinVolumeAgeSeconds was truncated by integer division when converted to the hour-granular protobuf field, so a sub-hour setting silently became 0 and disabled the age guard. * admin: split and normalize preferred_tags from admin.toml A comma-separated string, as set via environment variable, came through viper as a single slice element. Split on commas and reuse util.NormalizeTagList, matching the plugin config path. * scaffold: clarify admin.toml wording
41 lines
685 B
Go
41 lines
685 B
Go
package scaffold
|
|
|
|
import (
|
|
_ "embed"
|
|
"strings"
|
|
|
|
"github.com/seaweedfs/seaweedfs/weed/cluster/maintenance"
|
|
)
|
|
|
|
func init() {
|
|
Master = strings.ReplaceAll(masterTemplate, "{{DEFAULT_MAINTENANCE_SCRIPTS}}", maintenance.DefaultMasterMaintenanceScripts)
|
|
}
|
|
|
|
//go:embed filer.toml
|
|
var Filer string
|
|
|
|
//go:embed notification.toml
|
|
var Notification string
|
|
|
|
//go:embed replication.toml
|
|
var Replication string
|
|
|
|
//go:embed security.toml
|
|
var Security string
|
|
|
|
//go:embed master.toml
|
|
var masterTemplate string
|
|
var Master string
|
|
|
|
//go:embed volume.toml
|
|
var Volume string
|
|
|
|
//go:embed shell.toml
|
|
var Shell string
|
|
|
|
//go:embed credential.toml
|
|
var Credential string
|
|
|
|
//go:embed admin.toml
|
|
var Admin string
|