Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make AlphabeticalPolicy string check case insensitive #2216

Merged
merged 4 commits into from
Mar 12, 2024
Merged

Make AlphabeticalPolicy string check case insensitive #2216

merged 4 commits into from
Mar 12, 2024

Conversation

aditditto
Copy link
Contributor

Previously if users wanted to use image scan with descending alphabetical policy, they had to use uppercase DESC, as shown below:

imageScans:
# specify the policy to retrieve images, can be semver or alphabetical order
- policy:
    # can use ascending or descending order
    alphabetical:
      order: DESC

This is not very intuitive, because the documentation gives an example in lowercase:

imageScans:
# specify the policy to retrieve images, can be semver or alphabetical order
- policy:
    # if range is specified, it will take the latest image according to semver order in the range
    # for more details on how to use semver, see https://github.com/Masterminds/semver
    semver:
      range: "*"
    # can use ascending or descending order
    alphabetical:
      order: asc

This PR makes the string check case insensitive, removing the need to use uppercase DESC in the fleet.yaml

@aditditto aditditto requested a review from a team as a code owner March 10, 2024 14:35
Copy link
Contributor

@bigkevmcd bigkevmcd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, nice tidy fix.

@aditditto aditditto requested a review from bigkevmcd March 11, 2024 13:47
weyfonk
weyfonk previously approved these changes Mar 12, 2024
Copy link
Contributor

@weyfonk weyfonk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for your contribution :)

@weyfonk weyfonk merged commit aef96a4 into rancher:master Mar 12, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants