diff --git a/controllers/bucket_controller.go b/controllers/bucket_controller.go index 0a93ce11..71360dd7 100644 --- a/controllers/bucket_controller.go +++ b/controllers/bucket_controller.go @@ -383,8 +383,8 @@ func (r *BucketReconciler) notify(ctx context.Context, oldObj, newObj *sourcev1. // failure. if resErr == nil && res == sreconcile.ResultSuccess && newObj.Status.Artifact != nil { annotations := map[string]string{ - sourcev1.GroupVersion.Group + "/revision": newObj.Status.Artifact.Revision, - sourcev1.GroupVersion.Group + "/checksum": newObj.Status.Artifact.Checksum, + fmt.Sprintf("%s/%s", sourcev1.GroupVersion.Group, eventv1.MetaRevisionKey): newObj.Status.Artifact.Revision, + fmt.Sprintf("%s/%s", sourcev1.GroupVersion.Group, eventv1.MetaChecksumKey): newObj.Status.Artifact.Checksum, } var oldChecksum string diff --git a/controllers/gitrepository_controller.go b/controllers/gitrepository_controller.go index a41f9ba0..997f4022 100644 --- a/controllers/gitrepository_controller.go +++ b/controllers/gitrepository_controller.go @@ -295,8 +295,8 @@ func (r *GitRepositoryReconciler) notify(ctx context.Context, oldObj, newObj *so // and recovery from any failure. if r.shouldNotify(oldObj, newObj, res, resErr) { annotations := map[string]string{ - sourcev1.GroupVersion.Group + "/revision": newObj.Status.Artifact.Revision, - sourcev1.GroupVersion.Group + "/checksum": newObj.Status.Artifact.Checksum, + fmt.Sprintf("%s/%s", sourcev1.GroupVersion.Group, eventv1.MetaRevisionKey): newObj.Status.Artifact.Revision, + fmt.Sprintf("%s/%s", sourcev1.GroupVersion.Group, eventv1.MetaChecksumKey): newObj.Status.Artifact.Checksum, } var oldChecksum string diff --git a/controllers/helmchart_controller.go b/controllers/helmchart_controller.go index e1b9dc7f..c6a57692 100644 --- a/controllers/helmchart_controller.go +++ b/controllers/helmchart_controller.go @@ -308,8 +308,8 @@ func (r *HelmChartReconciler) notify(ctx context.Context, oldObj, newObj *source // failure. if resErr == nil && res == sreconcile.ResultSuccess && newObj.Status.Artifact != nil { annotations := map[string]string{ - sourcev1.GroupVersion.Group + "/revision": newObj.Status.Artifact.Revision, - sourcev1.GroupVersion.Group + "/checksum": newObj.Status.Artifact.Checksum, + fmt.Sprintf("%s/%s", sourcev1.GroupVersion.Group, eventv1.MetaRevisionKey): newObj.Status.Artifact.Revision, + fmt.Sprintf("%s/%s", sourcev1.GroupVersion.Group, eventv1.MetaChecksumKey): newObj.Status.Artifact.Checksum, } var oldChecksum string diff --git a/controllers/helmrepository_controller.go b/controllers/helmrepository_controller.go index deb176ff..4a1e89ff 100644 --- a/controllers/helmrepository_controller.go +++ b/controllers/helmrepository_controller.go @@ -268,8 +268,8 @@ func (r *HelmRepositoryReconciler) notify(ctx context.Context, oldObj, newObj *s // failure. if resErr == nil && res == sreconcile.ResultSuccess && newObj.Status.Artifact != nil { annotations := map[string]string{ - sourcev1.GroupVersion.Group + "/revision": newObj.Status.Artifact.Revision, - sourcev1.GroupVersion.Group + "/checksum": newObj.Status.Artifact.Checksum, + fmt.Sprintf("%s/%s", sourcev1.GroupVersion.Group, eventv1.MetaRevisionKey): newObj.Status.Artifact.Revision, + fmt.Sprintf("%s/%s", sourcev1.GroupVersion.Group, eventv1.MetaChecksumKey): newObj.Status.Artifact.Checksum, } humanReadableSize := "unknown size" diff --git a/controllers/ocirepository_controller.go b/controllers/ocirepository_controller.go index 599bc094..c0160a31 100644 --- a/controllers/ocirepository_controller.go +++ b/controllers/ocirepository_controller.go @@ -1098,8 +1098,8 @@ func (r *OCIRepositoryReconciler) notify(ctx context.Context, oldObj, newObj *so // failure. if resErr == nil && res == sreconcile.ResultSuccess && newObj.Status.Artifact != nil { annotations := map[string]string{ - sourcev1.GroupVersion.Group + "/revision": newObj.Status.Artifact.Revision, - sourcev1.GroupVersion.Group + "/checksum": newObj.Status.Artifact.Checksum, + fmt.Sprintf("%s/%s", sourcev1.GroupVersion.Group, eventv1.MetaRevisionKey): newObj.Status.Artifact.Revision, + fmt.Sprintf("%s/%s", sourcev1.GroupVersion.Group, eventv1.MetaChecksumKey): newObj.Status.Artifact.Checksum, } var oldChecksum string