Harbor: Add more versatile replication filters

Created on 8 Aug 2019  路  3Comments  路  Source: goharbor/harbor

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

arereplication candidat1.11.0 kinrequirement

Most helpful comment

@xaleeks was wondering if there's any tentative timeline for this work (this is still tagged for 1.11.0)? I totally agree that there need to be a consistent regex support throughout the different features, our immediate use case is with immutability rules.

All 3 comments

+1

we need a common consistent regex support for all features, not just limited to replication. Adding this to next release planning

@xaleeks was wondering if there's any tentative timeline for this work (this is still tagged for 1.11.0)? I totally agree that there need to be a consistent regex support throughout the different features, our immediate use case is with immutability rules.

Was this page helpful?
0 / 5 - 0 ratings