-
Notifications
You must be signed in to change notification settings - Fork 78
Open
Description
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-b207937f1As 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
Metadata
Metadata
Assignees
Labels
No labels