Skip to content

Commit

Permalink
correct rebase changes
Browse files Browse the repository at this point in the history
Signed-off-by: Siddhesh Ghadi <[email protected]>
  • Loading branch information
svghadi committed Jun 13, 2024
1 parent b1efcc7 commit 577eafd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions util/argo/audit_logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const (
EventReasonOperationCompleted = "OperationCompleted"
)

func (l *AuditLogger) logEvent(objMeta ObjectRef, gvk schema.GroupVersionKind, info EventInfo, message string, logFields map[string]string) {
func (l *AuditLogger) logEvent(objMeta ObjectRef, gvk schema.GroupVersionKind, info EventInfo, message string, logFields map[string]string, eventLabels map[string]string) {
logCtx := log.WithFields(log.Fields{
"type": info.Type,
"reason": info.Reason,
Expand All @@ -66,6 +66,7 @@ func (l *AuditLogger) logEvent(objMeta ObjectRef, gvk schema.GroupVersionKind, i
event := v1.Event{
ObjectMeta: metav1.ObjectMeta{
Name: fmt.Sprintf("%v.%x", objMeta.Name, t.UnixNano()),
Labels: eventLabels,
Annotations: logFields,
},
Source: v1.EventSource{
Expand Down Expand Up @@ -108,7 +109,7 @@ func (l *AuditLogger) LogAppEvent(app *v1alpha1.Application, info EventInfo, mes
if user != "" {
fields["user"] = user
}
l.logEvent(objectMeta, v1alpha1.ApplicationSchemaGroupVersionKind, info, message, fields)
l.logEvent(objectMeta, v1alpha1.ApplicationSchemaGroupVersionKind, info, message, fields, eventLabels)
}

func (l *AuditLogger) LogAppSetEvent(app *v1alpha1.ApplicationSet, info EventInfo, message, user string) {
Expand Down

0 comments on commit 577eafd

Please sign in to comment.