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

Why do we need to check for a strict semver in ParseVersion? #771

Open
mo-rieger opened this issue May 13, 2024 · 0 comments
Open

Why do we need to check for a strict semver in ParseVersion? #771

mo-rieger opened this issue May 13, 2024 · 0 comments

Comments

@mo-rieger
Copy link

I stumbled on this, when I was using an ImagePolicy with policy.semver.range defined.

Some repositories strip the patch version when doing a minor release, e.g. kubernetes-event-exporter. The image-reflector-controller cant evaluate the latest tag of such tags and logs: unable to determine latest version from provided list.

ImagePolicy

apiVersion: image.toolkit.fluxcd.io/v1beta2
kind: ImagePolicy
metadata:
  name: kubernetes-event-exporter
spec:
  imageRepositoryRef:
    name: kubernetes-event-exporter
  policy:
    semver:
      range: ^1.1

We see this because we check for a strict semver in ParseVersion, even though semver.NewVersion is used to return the version which could actually handle missing patch versions, like 1.1.

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

No branches or pull requests

1 participant