dockerkubernetesdocker-registryfluxcd

Flux V2 ImagePolicy version list argument cannot be empty


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.


Solution

  • 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.