You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: cmd/vclusterctl/cmd/create.go
+17-6Lines changed: 17 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -23,7 +23,8 @@ import (
23
23
)
24
24
25
25
varVersionMap=map[string]string{
26
-
"1.21": "rancher/k3s:v1.21.3-k3s1",
26
+
"1.22": "rancher/k3s:v1.22.1-rc1-k3s1",
27
+
"1.21": "rancher/k3s:v1.21.4-k3s1",
27
28
"1.20": "rancher/k3s:v1.20.9-k3s1",
28
29
"1.19": "rancher/k3s:v1.19.13-k3s1",
29
30
"1.18": "rancher/k3s:v1.18.20-k3s1",
@@ -67,6 +68,7 @@ type CreateCmd struct {
67
68
CreateClusterRolebool
68
69
Exposebool
69
70
Connectbool
71
+
Upgradebool
70
72
71
73
log log.Logger
72
74
}
@@ -100,7 +102,7 @@ vcluster create test --namespace test
100
102
},
101
103
}
102
104
103
-
cobraCmd.Flags().StringVar(&cmd.ChartVersion, "chart-version", upgrade.GetVersion(), "The virtual cluster chart version to use")
105
+
cobraCmd.Flags().StringVar(&cmd.ChartVersion, "chart-version", upgrade.GetVersion(), "The virtual cluster chart version to use (e.g. v0.4.0)")
104
106
cobraCmd.Flags().StringVar(&cmd.ChartName, "chart-name", "vcluster", "The virtual cluster chart name to use")
105
107
cobraCmd.Flags().StringVar(&cmd.ChartRepo, "chart-repo", "https://charts.loft.sh", "The virtual cluster chart repo to use")
106
108
cobraCmd.Flags().StringVar(&cmd.ReleaseValues, "release-values", "", "Path where to load the virtual cluster helm release values from")
@@ -111,6 +113,7 @@ vcluster create test --namespace test
111
113
cobraCmd.Flags().BoolVar(&cmd.CreateClusterRole, "create-cluster-role", false, "If true a cluster role will be created to access nodes, storageclasses and priorityclasses")
112
114
cobraCmd.Flags().BoolVar(&cmd.Expose, "expose", false, "If true will create a load balancer service to expose the vcluster endpoint")
113
115
cobraCmd.Flags().BoolVar(&cmd.Connect, "connect", false, "If true will run vcluster connect directly after the vcluster was created")
116
+
cobraCmd.Flags().BoolVar(&cmd.Upgrade, "upgrade", true, "If true will try to upgrade the vcluster instead of failing if it already exists")
0 commit comments