Add validator to kustomization

This commit is contained in:
Donny Xia
2020-06-16 13:59:44 -07:00
parent 8576acf1aa
commit a0c1979798
5 changed files with 72 additions and 0 deletions

View File

@@ -30,6 +30,12 @@ type Generator interface {
Generate() (ResMap, error)
}
// A Validator checkes the ResMap and return an error
// if it's not valid.
type Validator interface {
Validate(m ResMap) error
}
// Something that's configurable accepts an
// instance of PluginHelpers and a raw config
// object (YAML in []byte form).
@@ -73,6 +79,11 @@ type TransformerPlugin interface {
Configurable
}
type ValidatorPlugin interface {
Validator
Configurable
}
// ResMap is an interface describing operations on the
// core kustomize data structure, a list of Resources.
//