image-reflector-controller icon indicating copy to clipboard operation
image-reflector-controller copied to clipboard

[documentation] Please add a case for Plex images in the documentation

Open trois-six opened this issue 5 months ago • 0 comments

Hello,

I was not finding why the controller was not finding the semver of the Plex images (from docker.io/plexinc/pms-docker), but I finally understood.

My old config:

apiVersion: image.toolkit.fluxcd.io/v1beta2
kind: ImagePolicy
metadata:
  name: plex
  namespace: plex
spec:
  imageRepositoryRef:
    name: plex
  filterTags:
    pattern: '^(?P<semver>[0-9\.]+)-[0-9a-z]{9}$'
    extract: '$semver'
  policy:
    semver:
      range: '>=0.0.1'

Tags from my ImageRepository object:

  Last Scan Result:
    Latest Tags:
      public
      plexpass
      plex-user-test
      latest
      beta
      1.9.7.4460-a39b25852
      1.9.6.4429-23901a099
      1.9.4.4325-1bf240a65
      1.9.2.4285-9f65b88ae
      1.9.1.4272-b207937f1

As you can see the semver part of the tag has 3 dots instead of the usual one with 2 dots, and the implementation of the semver library that the Flux project is using from github.com/Masterminds/semver/v3 is following the spec of semver with only 2 dots.

So I had to change my regex to this to make it work:

apiVersion: image.toolkit.fluxcd.io/v1beta2
kind: ImagePolicy
metadata:
  name: plex
  namespace: plex
spec:
  imageRepositoryRef:
    name: plex
  filterTags:
    pattern: '^(?P<semver>[0-9\.]+)\.[0-9]+-[0-9a-z]{9}$'
    extract: '$semver'
  policy:
    semver:
      range: '>=0.0.1'

I could almost use an alphabetical order here, but it will not work when the version will be 1.10.x

trois-six avatar Aug 19 '25 12:08 trois-six