Matches ctl version to upstream

This commit is contained in:
2026-03-28 20:28:22 +08:00
parent 848daefffe
commit ecceff225f
25 changed files with 591 additions and 159 deletions

View File

@@ -2,9 +2,9 @@ package create
import (
"fmt"
"undecided.project/monok8s/pkg/templates"
"github.com/spf13/cobra"
render "undecided.project/monok8s/pkg/render"
)
func NewCmdCreate() *cobra.Command {
@@ -14,7 +14,11 @@ func NewCmdCreate() *cobra.Command {
Use: "config",
Short: "Print a MonoKSConfig template",
RunE: func(cmd *cobra.Command, _ []string) error {
_, err := fmt.Fprint(cmd.OutOrStdout(), templates.MonoKSConfigYAML)
out, err := render.RenderMonoKSConfig()
if err != nil {
return err
}
_, err = fmt.Fprint(cmd.OutOrStdout(), out)
return err
},
},
@@ -22,7 +26,11 @@ func NewCmdCreate() *cobra.Command {
Use: "osupgrade",
Short: "Print an OSUpgrade template",
RunE: func(cmd *cobra.Command, _ []string) error {
_, err := fmt.Fprint(cmd.OutOrStdout(), templates.OSUpgradeYAML)
out, err := render.RenderOSUpgrade()
if err != nil {
return err
}
_, err = fmt.Fprint(cmd.OutOrStdout(), out)
return err
},
},