Skip to content

Add more versatile replication filters #8614

@cedvan

Description

@cedvan

Hi all,

Need

I want replicate images from a namespace. But only need replicate tags "stable" to save my storage

On docker hub :

  • 1.10.0-alpha
  • 1.9.01
  • 1.9.0
  • 1.9.0-rc2
  • 1.9.0-rc1
  • 1.8.0

Need get on my harbor :

  • 1.9.01
  • 1.9.0
  • 1.8.0

So ignore pre release version and alpha version to save storage.

Problem

Try configure my replication rule with existing filters (cf. https://github.com/goharbor/harbor/blob/master/docs/user_guide.md#resource-filter)

  • *.*.* => but 1.9.0-rc1 match
  • ?.?.? => but 1.9.01 not match
  • {?.?.?,?.??.??} => Ok, but 1.10.0 soon available and so don't match

Problem : It is necessary to update the filter regularly so that my replication rule works in the future

Proposal solutions

1 - Add a pattern to match only number, like \d with regex
2 - Add more versatile replication filter like composer *, ~, ^, <, =, > (cf. https://getcomposer.org/doc/articles/versions.md#versions-and-constraints)
3 - Simply use regex as pattern to configure filter

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions