[#373] pruning: add optional regex field to last_n rule

fixes #373
This commit is contained in:
Christian Schwarz
2020-08-31 14:05:32 +02:00
parent 428a60870a
commit b1f8cdf385
5 changed files with 76 additions and 18 deletions
+1 -1
View File
@@ -60,7 +60,7 @@ func RuleFromConfig(in config.PruningEnum) (KeepRule, error) {
case *config.PruneKeepNotReplicated:
return NewKeepNotReplicated(), nil
case *config.PruneKeepLastN:
return NewKeepLastN(v.Count)
return NewKeepLastN(v.Count, v.Regex)
case *config.PruneKeepRegex:
return NewKeepRegex(v.Regex, v.Negate)
case *config.PruneGrid: