Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶ added in v1.8.0
type Cache interface { // Set inserts a policy in the cache Set(string, kyvernov1.PolicyInterface, ResourceFinder) error // Unset removes a policy from the cache Unset(string) // 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(PolicyType, schema.GroupVersionResource, string, string) []kyvernov1.PolicyInterface }
Cache 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
type ResourceFinder ¶ added in v1.10.0
type ResourceFinder interface {
FindResources(group, version, kind, subresource string) (map[dclient.TopLevelApiDescription]metav1.APIResource, error)
}
type TestResourceFinder ¶ added in v1.10.0
type TestResourceFinder struct{}
func (TestResourceFinder) FindResources ¶ added in v1.10.0
func (TestResourceFinder) FindResources(group, version, kind, subresource string) (map[dclient.TopLevelApiDescription]metav1.APIResource, error)
Click to show internal directories.
Click to hide internal directories.