cli, tools, util, modules: Add a grow util and module

This builds in some functionality for growing the filesystem for new
machines. It also gets wrapped with an mcl module for ease of use.
This commit is contained in:
James Shubin
2025-09-26 23:00:20 -04:00
parent 83743df3e4
commit a840dd43dd
7 changed files with 720 additions and 0 deletions

View File

@@ -125,6 +125,8 @@ type Args struct {
DocsCmd *DocsGenerateArgs `arg:"subcommand:docs" help:"generate documentation"`
ToolsCmd *ToolsArgs `arg:"subcommand:tools" help:"collection of useful tools"`
// This never runs, it gets preempted in the real main() function.
// XXX: Can we do it nicely with the new arg parser? can it ignore all args?
EtcdCmd *EtcdArgs `arg:"subcommand:etcd" help:"run standalone etcd"`
@@ -173,6 +175,10 @@ func (obj *Args) Run(ctx context.Context, data *cliUtil.Data) (bool, error) {
return cmd.Run(ctx, data)
}
if cmd := obj.ToolsCmd; cmd != nil {
return cmd.Run(ctx, data)
}
// NOTE: we could return true, fmt.Errorf("...") if more than one did
return false, nil // nobody activated
}