clitools: Added ConfigureDNS

This commit is contained in:
2026-03-27 20:25:54 +08:00
parent 87aa1d4b0b
commit 848daefffe
5 changed files with 132 additions and 24 deletions

View File

@@ -1,9 +1,9 @@
package internal
import (
"github.com/spf13/cobra"
"undecided.project/monok8s/pkg/bootstrap"
"undecided.project/monok8s/pkg/config"
"github.com/spf13/cobra"
)
func NewCmdInternal() *cobra.Command {
@@ -18,11 +18,19 @@ func NewCmdInternal() *cobra.Command {
if err != nil {
return err
}
cfg, err := (config.Loader{}).Load(path)
if err != nil {
return err
}
return bootstrap.NewRunner(cfg).RunNamedStep(cmd.Context(), args[0])
err = bootstrap.NewRunner(cfg).RunNamedStep(cmd.Context(), args[0])
if err != nil {
return err
}
cmd.Println("OK")
return nil
},
})
cmd.PersistentFlags().StringVarP(&configPath, "config", "c", "", "path to MonoKSConfig yaml")