remove 'create --version' flag
This commit is contained in:
parent
d6364af32c
commit
53eba1828d
@ -68,17 +68,6 @@ func CreateCluster(c *cli.Context) error {
|
||||
|
||||
// define image
|
||||
image := c.String("image")
|
||||
if c.IsSet("version") {
|
||||
// TODO: --version to be deprecated
|
||||
log.Println("[WARNING] The `--version` flag will be deprecated soon, please use `--image rancher/k3s:<version>` instead")
|
||||
if c.IsSet("image") {
|
||||
// version specified, custom image = error (to push deprecation of version flag)
|
||||
log.Fatalln("[ERROR] Please use `--image <image>:<version>` instead of --image and --version")
|
||||
} else {
|
||||
// version specified, default image = ok (until deprecation of version flag)
|
||||
image = fmt.Sprintf("%s:%s", strings.Split(image, ":")[0], c.String("version"))
|
||||
}
|
||||
}
|
||||
if len(strings.Split(image, "/")) <= 2 {
|
||||
// fallback to default registry
|
||||
image = fmt.Sprintf("%s/%s", defaultRegistry, image)
|
||||
|
||||
5
main.go
5
main.go
@ -91,11 +91,6 @@ func main() {
|
||||
Value: 0,
|
||||
Usage: "Automatically add an offset (* worker number) to the chosen host port when using `--publish` to map the same container-port from multiple k3d workers to the host",
|
||||
},
|
||||
cli.StringFlag{
|
||||
// TODO: to be deprecated
|
||||
Name: "version",
|
||||
Usage: "Choose the k3s image version",
|
||||
},
|
||||
cli.StringFlag{
|
||||
// TODO: only --api-port, -a soon since we want to use --port, -p for the --publish/--add-port functionality
|
||||
Name: "api-port, a, port, p",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user