Skip to content

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

Description

@mo-rieger

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to 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