Merge pull request #522 from pjbgf/audit-followup
Fix inconsistent code-style raised at security audit
This commit is contained in:
commit
1e84289623
|
@ -904,6 +904,7 @@ func (r *KustomizationReconciler) finalize(ctx context.Context, kustomization ku
|
|||
func (r *KustomizationReconciler) event(ctx context.Context, kustomization kustomizev1.Kustomization, revision, severity, msg string, metadata map[string]string) {
|
||||
log := logr.FromContext(ctx)
|
||||
|
||||
if r.EventRecorder != nil {
|
||||
annotations := map[string]string{
|
||||
kustomizev1.GroupVersion.Group + "/revision": revision,
|
||||
}
|
||||
|
@ -914,6 +915,7 @@ func (r *KustomizationReconciler) event(ctx context.Context, kustomization kusto
|
|||
}
|
||||
|
||||
r.EventRecorder.AnnotatedEventf(&kustomization, annotations, eventtype, severity, msg)
|
||||
}
|
||||
|
||||
if r.ExternalEventRecorder != nil {
|
||||
objRef, err := reference.GetReference(r.Scheme, &kustomization)
|
||||
|
|
Loading…
Reference in New Issue