Documentation ¶
Index ¶
- func NewRecorder(source Source, sink typedeventsv1.EventsV1Interface) events.EventRecorder
- type Action
- type Controller
- 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 ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewRecorder ¶ added in v1.10.0
func NewRecorder(source Source, sink typedeventsv1.EventsV1Interface) events.EventRecorder
Types ¶
type Controller ¶
Controller interface to generate event
func NewEventCleanupGenerator ¶ added in v1.10.5
func NewEventCleanupGenerator( client dclient.Interface, clustercleanuppolInformer kyvernov2beta1informers.ClusterCleanupPolicyInformer, cleanuppolInformer kyvernov2beta1informers.CleanupPolicyInformer, maxQueuedEvents int, log logr.Logger, ) Controller
NewEventGenerator to generate a new event cleanup controller
func NewEventGenerator ¶ added in v0.8.0
func NewEventGenerator( client dclient.Interface, cpInformer kyvernov1informers.ClusterPolicyInformer, pInformer kyvernov1informers.PolicyInformer, maxQueuedEvents int, omitEvents []string, log logr.Logger, ) Controller
NewEventGenerator to generate a new event controller
type Info ¶
type Info struct { Kind string Name string Namespace string RelatedAPIVersion string RelatedKind string RelatedName string RelatedNamespace string 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.