Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Controller ¶
type Controller struct { Cache Interface // contains filtered or unexported fields }
Controller is responsible for synchronizing Policy Cache, it embeds a policy informer to handle policy events. The cache is synced when a policy is add/update/delete. This cache is only used in the admission webhook to fast retrieve policies based on types (Mutate/ValidateEnforce/Generate).
func NewPolicyCacheController ¶
func NewPolicyCacheController( pInformer kyvernoinformer.ClusterPolicyInformer, nspInformer kyvernoinformer.PolicyInformer, log logr.Logger) *Controller
NewPolicyCacheController create a new PolicyController
func (*Controller) Run ¶
func (c *Controller) Run(workers int, stopCh <-chan struct{})
Run waits until policy informer to be synced
type Interface ¶
type Interface interface { Add(policy *kyverno.ClusterPolicy) Remove(policy *kyverno.ClusterPolicy) GetPolicyObject(pkey PolicyType, kind *string, nspace *string) []*kyverno.ClusterPolicy // contains filtered or unexported methods }
Interface ... Interface get method use for to get policy names and mostly use to test cache testcases
type PolicyType ¶
type PolicyType uint8
PolicyType represents types of policies
const ( Mutate PolicyType = 1 << iota ValidateEnforce ValidateAudit Generate )
Types of policies
Click to show internal directories.
Click to hide internal directories.