mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-07 00:17:13 +00:00
* added configmap data substitution for foreground mutate and validate * added configmap data substitution for foreground mutate and validate fmt * added configmap lookup for background * added comments to resource cache * added configmap data lookup in preConditions * added parse strings in In operator and configmap lookup docs * added configmap lookup docs * modified configmap lookup docs
32 lines
963 B
Go
32 lines
963 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"
|
|
"github.com/nirmata/kyverno/pkg/resourcecache"
|
|
"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
|
|
|
|
// ResourceCache provides listers to resources
|
|
// Currently Supports Configmap
|
|
ResourceCache resourcecache.ResourceCacheIface
|
|
// JSONContext ...
|
|
JSONContext *context.Context
|
|
}
|