seedling: Add auth flags to upgrade (#1179)

This commit is contained in:
Itxaka
2023-03-24 14:00:33 +01:00
parent 518d29be7d
commit 994c21fdc6

View File

@@ -37,6 +37,12 @@ var cmds = []*cli.Command{
Name: "image",
Usage: "Specify an full image reference, e.g.: quay.io/some/image:tag",
},
&cli.StringFlag{Name: "auth-username", Usage: "Username to authenticate to registry"},
&cli.StringFlag{Name: "auth-password", Usage: "Password to authenticate to registry"},
&cli.StringFlag{Name: "auth-server-address", Usage: "Authentication server address"},
&cli.StringFlag{Name: "auth-type", Usage: "Auth type"},
&cli.StringFlag{Name: "auth-registry-token", Usage: "Authentication registry token"},
&cli.StringFlag{Name: "auth-identity-token", Usage: "Authentication identity token"},
},
Description: `
Manually upgrade a kairos node.
@@ -79,7 +85,13 @@ See https://kairos.io/docs/upgrade/manual/ for documentation.
if c.Args().Len() == 1 {
v = c.Args().First()
}
return agent.Upgrade(v, c.String("image"), c.Bool("force"), c.Bool("debug"), c.Bool("strict-validation"), configScanDir)
return agent.Upgrade(
v, c.String("image"), c.Bool("force"), c.Bool("debug"),
c.Bool("strict-validation"), configScanDir,
c.String("auth-username"), c.String("auth-password"), c.String("auth-server-address"),
c.String("auth-type"), c.String("auth-registry-token"), c.String("auth-identity-token"),
)
},
},