Documentation ¶
Index ¶
- func BlockRequest(engineResponses []*response.EngineResponse, ...) bool
- func ExcludeKyvernoResources(kind string) bool
- func GetBlockedMessages(engineResponses []*response.EngineResponse) string
- func GetWarningMessages(engineResponses []*response.EngineResponse) []string
- type PolicyContextBuilder
- type UpdateRequestUpdater
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BlockRequest ¶
func BlockRequest(engineResponses []*response.EngineResponse, failurePolicy kyvernov1.FailurePolicyType, log logr.Logger) bool
returns true -> if there is even one policy that blocks resource request returns false -> if all the policies are meant to report only, we dont block resource request
func ExcludeKyvernoResources ¶
func GetBlockedMessages ¶
func GetBlockedMessages(engineResponses []*response.EngineResponse) string
GetBlockedMessages gets the error messages for rules with error or fail status
func GetWarningMessages ¶
func GetWarningMessages(engineResponses []*response.EngineResponse) []string
Types ¶
type PolicyContextBuilder ¶
type PolicyContextBuilder interface {
Build(*admissionv1.AdmissionRequest, ...kyvernov1.PolicyInterface) (*engine.PolicyContext, error)
}
func NewPolicyContextBuilder ¶
func NewPolicyContextBuilder( configuration config.Configuration, client dclient.Interface, rbLister rbacv1listers.RoleBindingLister, crbLister rbacv1listers.ClusterRoleBindingLister, ) PolicyContextBuilder
type UpdateRequestUpdater ¶
type UpdateRequestUpdater interface { // UpdateAnnotation updates UR annotation, triggering reprocessing of UR and recreation/updation of generated resource UpdateAnnotation(logger logr.Logger, name string) }
func NewUpdateRequestUpdater ¶
func NewUpdateRequestUpdater(client versioned.Interface, lister kyvernov1beta1listers.UpdateRequestNamespaceLister) UpdateRequestUpdater
Click to show internal directories.
Click to hide internal directories.