Skip to content

Commit

Permalink
Merge pull request #632 from fluxcd/event-revision-annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
hiddeco authored Mar 23, 2022
2 parents 0147495 + 7ca3934 commit 985a915
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions controllers/bucket_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -570,8 +570,8 @@ func (r *BucketReconciler) reconcileArtifact(ctx context.Context, obj *sourcev1.
return sreconcile.ResultEmpty, e
}
r.annotatedEventLogf(ctx, obj, map[string]string{
"revision": artifact.Revision,
"checksum": artifact.Checksum,
sourcev1.GroupVersion.Group + "/revision": artifact.Revision,
sourcev1.GroupVersion.Group + "/checksum": artifact.Checksum,
}, corev1.EventTypeNormal, "NewArtifact", "fetched %d files from '%s'", index.Len(), obj.Spec.BucketName)

// Record it on the object
Expand Down
4 changes: 2 additions & 2 deletions controllers/gitrepository_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -519,8 +519,8 @@ func (r *GitRepositoryReconciler) reconcileArtifact(ctx context.Context,
return sreconcile.ResultEmpty, e
}
r.AnnotatedEventf(obj, map[string]string{
"revision": artifact.Revision,
"checksum": artifact.Checksum,
sourcev1.GroupVersion.Group + "/revision": artifact.Revision,
sourcev1.GroupVersion.Group + "/checksum": artifact.Checksum,
}, corev1.EventTypeNormal, "NewArtifact", "stored artifact for commit '%s'", commit.ShortMessage())

// Record it on the object
Expand Down
4 changes: 2 additions & 2 deletions controllers/helmchart_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -676,8 +676,8 @@ func (r *HelmChartReconciler) reconcileArtifact(ctx context.Context, obj *source

// Publish an event
r.AnnotatedEventf(obj, map[string]string{
"revision": artifact.Revision,
"checksum": artifact.Checksum,
sourcev1.GroupVersion.Group + "/revision": artifact.Revision,
sourcev1.GroupVersion.Group + "/checksum": artifact.Checksum,
}, corev1.EventTypeNormal, reasonForBuild(b), b.Summary())

// Update symlink on a "best effort" basis
Expand Down
4 changes: 2 additions & 2 deletions controllers/helmrepository_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -453,8 +453,8 @@ func (r *HelmRepositoryReconciler) reconcileArtifact(ctx context.Context, obj *s
size := units.HumanSize(float64(fi.Size()))

r.AnnotatedEventf(obj, map[string]string{
"revision": artifact.Revision,
"checksum": artifact.Checksum,
sourcev1.GroupVersion.Group + "/revision": artifact.Revision,
sourcev1.GroupVersion.Group + "/checksum": artifact.Checksum,
}, corev1.EventTypeNormal, "NewArtifact", "fetched index of size %s from '%s'", size, chartRepo.URL)

// Record it on the object.
Expand Down

0 comments on commit 985a915

Please sign in to comment.