feat: 添加了 imager 工具 package
refactor: 将 images 的获取分散到各个组件里面
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
package makecmd
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
"yizhisec.com/hsv2/forge/internal/controller/maker"
|
||||
"yizhisec.com/hsv2/forge/internal/opt"
|
||||
@@ -10,7 +12,7 @@ func Redis() *cobra.Command {
|
||||
var (
|
||||
replicas int
|
||||
password string
|
||||
storage string
|
||||
storage int
|
||||
)
|
||||
|
||||
_cmd := &cobra.Command{
|
||||
@@ -23,14 +25,14 @@ func Redis() *cobra.Command {
|
||||
cmd.Context(),
|
||||
maker.WithRedisReplicaCount(replicas),
|
||||
maker.WithRedisPassword(password),
|
||||
maker.WithRedisStorage(storage),
|
||||
maker.WithRedisStorage(fmt.Sprintf("%dGi")),
|
||||
)
|
||||
},
|
||||
}
|
||||
|
||||
_cmd.Flags().IntVar(&replicas, "replica-count", 2, "Redis 副本数")
|
||||
_cmd.Flags().StringVar(&password, "password", "", "Redis 密码")
|
||||
_cmd.Flags().StringVar(&storage, "storage-size", "5Gi", "Redis 存储大小(如: 5Gi)")
|
||||
_cmd.Flags().IntVar(&storage, "storage-size", 5, "Redis 存储大小(单位Gi)如: 5")
|
||||
|
||||
return _cmd
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user