refactor: 整理结构和 maker 构建方式

This commit is contained in:
zhaoyupeng
2025-11-27 11:06:38 +08:00
parent 11523e3e48
commit fdad0eb36c
63 changed files with 137 additions and 153 deletions

View File

@@ -3,6 +3,7 @@ package makecmd
import (
"github.com/spf13/cobra"
"yizhisec.com/hsv2/forge/internal/controller/maker"
"yizhisec.com/hsv2/forge/internal/opt"
)
func Longhorn() *cobra.Command {
@@ -15,7 +16,7 @@ func Longhorn() *cobra.Command {
Short: "Build Longhorn resources",
Long: `Build and prepare Longhorn storage resources.`,
RunE: func(cmd *cobra.Command, args []string) error {
mk := maker.NewMaker()
mk := maker.NewMaker(opt.Cfg.Make.Dir)
return mk.Longhorn(cmd.Context(), replicaCount)
},
}