Documentation ¶
Index ¶
- Constants
- func NewEventGenerator(eventsClient v1.EventsV1Interface, logger logr.Logger, omitEvents ...string) *controller
- type Action
- type Info
- func NewBackgroundFailedEvent(err error, policy kyvernov1.PolicyInterface, rule string, source Source, ...) []Info
- func NewBackgroundSuccessEvent(source Source, policy kyvernov1.PolicyInterface, ...) []Info
- func NewCleanupPolicyEvent(policy kyvernov2alpha1.CleanupPolicyInterface, ...) Info
- func NewFailedEvent(err error, policy, rule string, source Source, resource kyvernov1.ResourceSpec) Info
- func NewPolicyAppliedEvent(source Source, engineResponse engineapi.EngineResponse) Info
- func NewPolicyExceptionEvents(engineResponse engineapi.EngineResponse, ruleResp engineapi.RuleResponse, ...) []Info
- func NewPolicyFailEvent(source Source, reason Reason, engineResponse engineapi.EngineResponse, ...) Info
- func NewResourceGenerationEvent(policy, rule string, source Source, resource kyvernov1.ResourceSpec) Info
- func NewResourceViolationEvent(source Source, reason Reason, engineResponse engineapi.EngineResponse, ...) Info
- func NewValidatingAdmissionPolicyEvent(policy kyvernov1.PolicyInterface, vapName, vapBindingName string) []Info
- type Interface
- type Reason
- type Source
Constants ¶
View Source
const ( Workers = 3 ControllerName = "kyverno-events" )
Variables ¶
This section is empty.
Functions ¶
func NewEventGenerator ¶ added in v0.8.0
func NewEventGenerator(eventsClient v1.EventsV1Interface, logger logr.Logger, omitEvents ...string) *controller
NewEventGenerator to generate a new event controller
Types ¶
type Info ¶
type Info struct { Regarding corev1.ObjectReference Related *corev1.ObjectReference Reason Reason Message string Action Action Source Source }
Info defines the event details
func NewBackgroundFailedEvent ¶ added in v1.7.0
func NewBackgroundFailedEvent(err error, policy kyvernov1.PolicyInterface, rule string, source Source, resource kyvernov1.ResourceSpec) []Info
func NewBackgroundSuccessEvent ¶ added in v1.7.0
func NewBackgroundSuccessEvent(source Source, policy kyvernov1.PolicyInterface, resources []kyvernov1.ResourceSpec) []Info
func NewCleanupPolicyEvent ¶ added in v1.10.5
func NewCleanupPolicyEvent(policy kyvernov2alpha1.CleanupPolicyInterface, resource unstructured.Unstructured, err error) Info
func NewFailedEvent ¶ added in v1.10.0
func NewPolicyAppliedEvent ¶ added in v1.7.0
func NewPolicyAppliedEvent(source Source, engineResponse engineapi.EngineResponse) Info
func NewPolicyExceptionEvents ¶ added in v1.9.0
func NewPolicyExceptionEvents(engineResponse engineapi.EngineResponse, ruleResp engineapi.RuleResponse, source Source) []Info
func NewPolicyFailEvent ¶ added in v1.7.0
func NewPolicyFailEvent(source Source, reason Reason, engineResponse engineapi.EngineResponse, ruleResp engineapi.RuleResponse, blocked bool) Info
func NewResourceGenerationEvent ¶ added in v1.10.2
func NewResourceGenerationEvent(policy, rule string, source Source, resource kyvernov1.ResourceSpec) Info
func NewResourceViolationEvent ¶ added in v1.7.0
func NewResourceViolationEvent(source Source, reason Reason, engineResponse engineapi.EngineResponse, ruleResp engineapi.RuleResponse) Info
func NewValidatingAdmissionPolicyEvent ¶ added in v1.10.5
func NewValidatingAdmissionPolicyEvent(policy kyvernov1.PolicyInterface, vapName, vapBindingName string) []Info
type Interface ¶ added in v0.8.0
type Interface interface {
Add(infoList ...Info)
}
Interface to generate event
type Source ¶ added in v1.1.0
type Source string
Source of event generation
const ( // AdmissionController : event generated in admission-control webhook AdmissionController Source = "kyverno-admission" // PolicyController : event generated in policy-controller PolicyController Source = "kyverno-scan" // GeneratePolicyController : event generated in generate policyController GeneratePolicyController Source = "kyverno-generate" // MutateExistingController : event generated for mutateExisting policies MutateExistingController Source = "kyverno-mutate" // CleanupController : event generated for cleanup policies CleanupController Source = "kyverno-cleanup" )
Click to show internal directories.
Click to hide internal directories.