-
Notifications
You must be signed in to change notification settings - Fork 220
Description
I have been experimenting with flux 2.4.0, and was surprised to find out that git commit status updates are not supported when using OCIRepository manifest sources, despite the examples in the docs https://fluxcd.io/flux/cmd/flux_push_artifact/#synopsis (permalink) suggesting to annotate the artifact with the source revision, for example, the first example shows using --revision:
flux push artifact oci://ghcr.io/org/config/app:$(git rev-parse --short HEAD) \
--path="./path/to/local/manifests" \
--source="$(git config --get remote.origin.url)" \
--revision="$(git branch --show-current)@sha1:$(git rev-parse HEAD)"What's the point of annotating these artifacts if the source revision is not used by the notification controller?
What I'd like to see is when reconciling a kustomization from an OCIRepository source, calls to KustomizationReconciler.event(...) that have the source available (some calls won't have a source, such as when access is denied) include the org.opencontainers.image.revision annotation that's included in the source manifest's annotations. One obvious example of where I'd like to see this is on the event successfully reconciled event:
kustomize-controller/internal/controller/kustomization_controller.go
Lines 198 to 201 in 29080cb
| r.event(obj, obj.Status.LastAppliedRevision, eventv1.EventSeverityInfo, msg, | |
| map[string]string{ | |
| kustomizev1.GroupVersion.Group + "/" + eventv1.MetaCommitStatusKey: eventv1.MetaCommitStatusUpdateValue, | |
| }) |