fix k3s version metadata (#256)

This commit is contained in:
Enrico Candino
2025-02-18 16:04:11 +01:00
committed by GitHub
parent 8811ba74de
commit 65fe7a678f
2 changed files with 7 additions and 1 deletions
+6
View File
@@ -89,6 +89,12 @@ func createAction(config *CreateConfig) cli.ActionFunc {
return err
}
if strings.Contains(config.version, "+") {
orig := config.version
config.version = strings.Replace(config.version, "+", "-", -1)
logrus.Warnf("Invalid K3s docker reference version: '%s'. Using '%s' instead", orig, config.version)
}
if config.token != "" {
logrus.Infof("Creating cluster token secret")
obj := k3kcluster.TokenSecretObj(config.token, name, cmds.Namespace())
+1 -1
View File
@@ -77,7 +77,7 @@ func NewCreateFlags(config *CreateConfig) []cli.Flag {
},
&cli.StringFlag{
Name: "mode",
Usage: "k3k mode type",
Usage: "k3k mode type (shared, virtual)",
Destination: &config.mode,
Value: "shared",
Action: func(ctx *cli.Context, value string) error {