Skip to content

Commit

Permalink
Add a falg kubernetes version to kk install (#240)
Browse files Browse the repository at this point in the history
  • Loading branch information
LinuxSuRen committed Nov 3, 2021
1 parent e6f66fb commit 64e21cc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 3 additions & 1 deletion kubectl-plugin/install/kk.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ ks install kk --version nightly --components devops`,
flags := cmd.Flags()
flags.StringVarP(&opt.version, "version", "v", types.KsVersion,
fmt.Sprintf("The version of KubeSphere. Support value could be %s, nightly, nightly-20210309. nightly equals to nightly-latest", types.KsVersion))
flags.StringVarP(&opt.version, "kubernetesVersion", "", types.K8sVersion,
"The version of Kubernetes")
flags.StringArrayVarP(&opt.components, "components", "", []string{},
"The components which you want to enable after the installation")
flags.StringVarP(&opt.zone, "zone", "", "cn",
Expand Down Expand Up @@ -185,7 +187,7 @@ func (o *kkOption) runE(cmd *cobra.Command, args []string) (err error) {
Env: []string{fmt.Sprintf("KKZONE=%s", o.zone)},
}
if err = commander.execCommand("kk", "create", "cluster", "--filename", configFile,
"--with-kubesphere", o.version, "--yes"); err != nil {
"--with-kubesphere", o.version, "--with-kubernetes", o.kubernetesVersion, "--yes"); err != nil {
return
}

Expand Down
6 changes: 4 additions & 2 deletions kubectl-plugin/types/constant.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package types

const (
// KsVersion is the latest release version
KsVersion = "v3.1.1"
// KsVersion is the default release version of KuberSphere
KsVersion = "v3.2.0"
// K8sVersion is the default version of the Kubernetes
K8sVersion = "v1.22.1"
)

0 comments on commit 64e21cc

Please sign in to comment.