Skip to content

Improve rke2 validate-charts script #9441

@mgfritch

Description

@mgfritch

Is your feature request related to a problem? Please describe.

Placeholder for feature improvements to the rke2 validate-charts script

Describe the solution you'd like

  • the semver compare is incorrect
    if [ "$lower_bound_major" -le "$kube_version_major" ] && \
    [ "$kube_version_major" -le "$upper_bound_major" ] && \
    [ "$lower_bound_minor" -le "$kube_version_minor" ] && \
    [ "$kube_version_minor" -le "$upper_bound_minor" ] && \
    [ "$lower_bound_patch" -le "$kube_version_patch" ] && \
    [ "$kube_version_patch" -le "$upper_bound_patch" ]; then
  • chart comparison operators (>=, <) are unhandled
    version_annotation=$(yq e '.annotations."catalog.cattle.io/kube-version" // ""' $chart_folder/$chart_name/Chart.yaml | awk '{print $2 " " $4}')
    if [[ ${version_annotation} != " " ]]; then
    read lower_bound upper_bound <<< $version_annotation
    supported=$(is_supported ${KUBERNETES_VERSION} $lower_bound $upper_bound)

Describe alternatives you've considered

Convert this script to golang?

Additional context

See also: #9435 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions