Skip to content

Commit

Permalink
fix(vclusterctl): deprecate kubernetes-version flag in vcluster create
Browse files Browse the repository at this point in the history
  • Loading branch information
kale-amruta committed Jan 17, 2025
1 parent 646c6b0 commit fa4221c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 1 addition & 4 deletions pkg/cli/create_helm.go
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,7 @@ func CreateHelm(ctx context.Context, options *CreateOptions, globalFlags *flags.
if err != nil {
return err
}

chartValues, err := config.GetExtraValues(chartOptions)
if err != nil {
return err
Expand Down Expand Up @@ -724,10 +725,6 @@ func (cmd *createHelm) getKubernetesVersion() (*version.Info, error) {

majorMinorVer := semver.MajorMinor(cmd.KubernetesVersion)

if splittedVersion := strings.Split(cmd.KubernetesVersion, "."); len(splittedVersion) > 2 {
cmd.log.Warnf("currently we only support major.minor version (%s) and not the patch version (%s)", majorMinorVer, cmd.KubernetesVersion)
}

parsedVersion, err := config.ParseKubernetesVersionInfo(majorMinorVer)
if err != nil {
return nil, err
Expand Down
2 changes: 2 additions & 0 deletions pkg/cli/flags/create/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ func AddCommonFlags(cmd *cobra.Command, options *cli.CreateOptions) {
_ = cmd.Flags().MarkDeprecated("distro", fmt.Sprintf("please specify the distro by setting %q accordingly via values.yaml file.", "controlPlane.distro"))
_ = cmd.Flags().MarkHidden("update-current")
_ = cmd.Flags().MarkDeprecated("update-current", fmt.Sprintf("please use %q.", "--connect"))
_ = cmd.Flags().MarkHidden("kubernetes-version")
_ = cmd.Flags().MarkDeprecated("kubernetes-version", fmt.Sprintf("please specify the kubernetes version by setting %q accordingly via values.yaml file.", "controlPlane.distro.k8s.version"))
}

func AddHelmFlags(cmd *cobra.Command, options *cli.CreateOptions) {
Expand Down

0 comments on commit fa4221c

Please sign in to comment.