mirror of
https://github.com/goharbor/harbor.git
synced 2025-02-12 18:01:54 +01:00
Register the new evaluator with the index package
Signed-off-by: Nathan Lowe <public@nlowe.me>
This commit is contained in:
parent
14eff4d9f2
commit
9f88e78381
@ -17,20 +17,14 @@ package index
|
|||||||
import (
|
import (
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"github.com/goharbor/harbor/src/pkg/retention/policy/rule"
|
|
||||||
|
|
||||||
"github.com/goharbor/harbor/src/pkg/retention/policy/rule/latestpl"
|
|
||||||
|
|
||||||
"github.com/goharbor/harbor/src/pkg/retention/policy/rule/latestk"
|
|
||||||
|
|
||||||
"github.com/goharbor/harbor/src/pkg/retention/policy/rule/always"
|
|
||||||
|
|
||||||
"github.com/goharbor/harbor/src/pkg/retention/policy/rule/lastx"
|
|
||||||
|
|
||||||
"github.com/goharbor/harbor/src/pkg/retention/policy/rule/latestps"
|
|
||||||
|
|
||||||
"github.com/goharbor/harbor/src/pkg/retention/policy/action"
|
"github.com/goharbor/harbor/src/pkg/retention/policy/action"
|
||||||
|
"github.com/goharbor/harbor/src/pkg/retention/policy/rule"
|
||||||
|
"github.com/goharbor/harbor/src/pkg/retention/policy/rule/always"
|
||||||
|
"github.com/goharbor/harbor/src/pkg/retention/policy/rule/daysps"
|
||||||
|
"github.com/goharbor/harbor/src/pkg/retention/policy/rule/lastx"
|
||||||
|
"github.com/goharbor/harbor/src/pkg/retention/policy/rule/latestk"
|
||||||
|
"github.com/goharbor/harbor/src/pkg/retention/policy/rule/latestpl"
|
||||||
|
"github.com/goharbor/harbor/src/pkg/retention/policy/rule/latestps"
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -131,6 +125,20 @@ func init() {
|
|||||||
Action: action.Retain,
|
Action: action.Retain,
|
||||||
Parameters: []*IndexedParam{},
|
Parameters: []*IndexedParam{},
|
||||||
}, always.New)
|
}, always.New)
|
||||||
|
|
||||||
|
// Register daysps
|
||||||
|
Register(&Metadata{
|
||||||
|
TemplateID: daysps.TemplateID,
|
||||||
|
Action: action.Retain,
|
||||||
|
Parameters: []*IndexedParam{
|
||||||
|
{
|
||||||
|
Name: daysps.ParameterN,
|
||||||
|
Type: "int",
|
||||||
|
Unit: "days",
|
||||||
|
Required: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}, daysps.New)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Register the rule evaluator with the corresponding rule template
|
// Register the rule evaluator with the corresponding rule template
|
||||||
|
Loading…
Reference in New Issue
Block a user