mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-05 23:46:56 +00:00
* configrable rules added * fix exclude group logic from code * flag added in yaml * exclude username added * exclude username added * config interface implimented * configure exclude username * get role ref * test case fixed * panic fix * move from interface to slice * exclude added in mutate * trim strings * configmap changes added * kustomize changes for configmap * k8s resources added
25 lines
735 B
Go
25 lines
735 B
Go
package engine
|
|
|
|
import (
|
|
kyverno "github.com/nirmata/kyverno/pkg/api/kyverno/v1"
|
|
client "github.com/nirmata/kyverno/pkg/dclient"
|
|
"github.com/nirmata/kyverno/pkg/engine/context"
|
|
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
|
|
)
|
|
|
|
// PolicyContext contains the contexts for engine to process
|
|
type PolicyContext struct {
|
|
// policy to be processed
|
|
Policy kyverno.ClusterPolicy
|
|
// resource to be processed
|
|
NewResource unstructured.Unstructured
|
|
// old Resource - Update operations
|
|
OldResource unstructured.Unstructured
|
|
AdmissionInfo kyverno.RequestInfo
|
|
// Dynamic client - used by generate
|
|
Client *client.Client
|
|
// Contexts to store resources
|
|
Context context.EvalInterface
|
|
// Config handler
|
|
ExcludeGroupRole []string
|
|
}
|