Skip to content

Commit

Permalink
Merge pull request #695 from fluxcd/event-meta-token
Browse files Browse the repository at this point in the history
Include revision and token in event metadata
  • Loading branch information
hiddeco authored May 31, 2023
2 parents ea11c68 + 2ea7393 commit c61a098
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions internal/controller/helmrelease_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -797,11 +797,12 @@ func (r *HelmReleaseReconciler) event(_ context.Context, hr v2.HelmRelease, revi
var eventMeta map[string]string

if revision != "" || hr.Status.LastAttemptedValuesChecksum != "" {
eventMeta = make(map[string]string)
if revision != "" {
eventMeta = map[string]string{v2.GroupVersion.Group + "/" + eventv1.MetaRevisionKey: revision}
eventMeta[v2.GroupVersion.Group+"/"+eventv1.MetaRevisionKey] = revision
}
if hr.Status.LastAttemptedValuesChecksum != "" {
eventMeta = map[string]string{v2.GroupVersion.Group + "/" + eventv1.MetaTokenKey: hr.Status.LastAttemptedValuesChecksum}
eventMeta[v2.GroupVersion.Group+"/"+eventv1.MetaTokenKey] = hr.Status.LastAttemptedValuesChecksum
}
}

Expand Down

0 comments on commit c61a098

Please sign in to comment.