1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-06 16:06:56 +00:00
kyverno/pkg/engine/engine.go

23 lines
755 B
Go
Raw Normal View History

2019-05-13 18:17:28 -07:00
package engine
2019-05-09 22:26:22 -07:00
import (
2019-05-21 11:00:09 -07:00
types "github.com/nirmata/kyverno/pkg/apis/policy/v1alpha1"
"github.com/nirmata/kyverno/pkg/event"
"github.com/nirmata/kyverno/pkg/violation"
2019-05-09 22:26:22 -07:00
)
// As the logic to process the policies in stateless, we do not need to define struct and implement behaviors for it
// Instead we expose them as standalone functions passing the required atrributes
// The each function returns the changes that need to be applied on the resource
// the caller is responsible to apply the changes to the resource
2019-05-09 22:26:22 -07:00
func ProcessExisting(policy types.Policy, rawResource []byte) ([]violation.Info, []event.Info, error) {
2019-05-14 18:20:41 -07:00
var violations []violation.Info
var events []event.Info
2019-05-14 18:20:41 -07:00
// TODO:
// Mutate()
// Validate()
return violations, events, nil
}