Skip to content

Commit

Permalink
feat: talosctl: allow v-prefixed k8s versions
Browse files Browse the repository at this point in the history
Accept both `1.19.2` and `v1.19.2` formats for kubernetes versions in
`talosctl gen`.

Fixes #3155

Signed-off-by: Seán C McCord <ulexus@gmail.com>
  • Loading branch information
Ulexus authored and talos-bot committed Feb 26, 2021
1 parent c7ee239 commit 61cb2fb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cmd/talosctl/cmd/mgmt/cluster/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ func create(ctx context.Context) (err error) {
&bundle.InputOptions{
ClusterName: clusterName,
Endpoint: fmt.Sprintf("https://%s:%d", defaultInternalLB, constants.DefaultControlPlanePort),
KubeVersion: kubernetesVersion,
KubeVersion: strings.TrimPrefix(kubernetesVersion, "v"),
GenOptions: genOptions,
}),
)
Expand Down
2 changes: 1 addition & 1 deletion cmd/talosctl/cmd/mgmt/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ func genV1Alpha1Config(args []string) error {
&bundle.InputOptions{
ClusterName: args[0],
Endpoint: args[1],
KubeVersion: kubernetesVersion,
KubeVersion: strings.TrimPrefix(kubernetesVersion, "v"),
GenOptions: append(genOptions,
generate.WithInstallDisk(installDisk),
generate.WithInstallImage(installImage),
Expand Down

0 comments on commit 61cb2fb

Please sign in to comment.