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/imageVerify).
func NewPolicyCacheController ¶
func NewPolicyCacheController(pInformer kyvernoinformer.ClusterPolicyInformer, nspInformer kyvernoinformer.PolicyInformer) *Controller
NewPolicyCacheController create a new PolicyController
func (*Controller) CheckPolicySync ¶ added in v1.7.0
func (c *Controller) CheckPolicySync(stopCh <-chan struct{})
CheckPolicySync wait until the internal policy cache is fully loaded
type Interface ¶
type Interface interface { // GetPolicies returns all policies that apply to a namespace, including cluster-wide policies // If the namespace is empty, only cluster-wide policies are returned GetPolicies(pType PolicyType, kind string, namespace string) []kyverno.PolicyInterface // 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 VerifyImagesMutate VerifyImagesValidate )
Types of policies
Click to show internal directories.
Click to hide internal directories.