6

I have the following imagepolicy:

apiVersion: image.toolkit.fluxcd.io/v1alpha2
kind: ImagePolicy
metadata:
  name: cps-kul-beta-imagepolicy
  namespace: flux-system
spec:
  imageRepositoryRef:
    name: cps-kul-image
  filterTags:
    pattern: '^sha-(?P<ts>.*)-.+'
    extract: '$ts'
  policy:
    numerical:
      order: asc

And I get the error version list argument cannot be empty when doing kubectl describe on that object.

Frederik Baetens
  • 781
  • 1
  • 9
  • 20

1 Answers1

7

This error means that there's no images in the registry which conform to the tag pattern prescribed in the filterTags section. Uploading a new image to the registry will fix this problem.

Frederik Baetens
  • 781
  • 1
  • 9
  • 20
  • Nice, I added it to `exclusionList` in `Alert` spec. – bits Jun 17 '21 at 20:57
  • Thanks! To be honest, I'm not sure that missing images are the only source of this error, I'm just a regular user. What's the effect of adding it to the exclusionlist by the way? – Frederik Baetens Jun 18 '21 at 22:07
  • Since the error message is not reflective of "no images in registry" its not a useful alert hence adding it to `exclustionList` will prevent Flux to fire an Alert - so in my case I don't get a Slack notification because even if I did its not helpful. – bits Jun 28 '21 at 18:40