Open cedvan opened 5 years ago
+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.
as workaround we use this filter {?,??}.{?,??}.{?,??}
for some kind of semver matching
@HaveFun83 This solution not match versions "X" and "X.X"
@HaveFun83 This solution not match versions "X" and "X.X"
sure "X" and "X.X" is not a semver annotation so far as i know. https://semver.org/#spec-item-2
Hey @xaleeks, is there any update you can provide on this? would love to this get slotted for a future version 🙏🏼
this topic has also just come up in our company, it would be fabulous if this feature were to be implimented soon.
We are waiting for this feature, too.
I have the feeling that this thread receives no attention :-(
1.11.0 candidate, last version is 2.2.2...
I would love to see this feature in the next release. It's super annoying without this feature
This feature would be absolut awesome!
My company would also love to have regex support in the tag filtering
ping @qnetter for awareness
I have applied for this project on LFX website. I have started learning GO, so can I get some pointers on how to get started with this project.
This issue seems like a great starting point for getting started with a contribution to Harbor. Landed here from the LFX Mentorship projects.
I'd like to get started with the issue regardless.
Can someone point out the file where the regex is written for the filters for me to take a look?
I would opt for option 3. Paired with a fast regex lib like re2, it should be possible to filter a big chunk of repos at once
I would opt for option 3. Paired with a fast regex lib like re2, it should be possible to filter a big chunk of repos at once
So will the function IsSemanticVersion()
be similar to the other functions in pattern.go do? It'll have regex-matching semantic versioning numbers.
We should also, make sure that the new feature is backwards-compatible.
I see two options.
I would prefer option 1)
migrate/convert existing rules into regex
Agreed. This can be done. There are 2 approaches to doing this
I'd prefer option 2 since it'll give us more clarity into regex.
I've drafted a proposal for this issue formulating multiple approaches to solve the issue, please review and share your thoughts.
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)
*.*.*
=> but1.9.0-rc1
match?.?.?
=> but1.9.01
not match{?.?.?,?.??.??}
=> Ok, but 1.10.0 soon available and so don't matchProblem : 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