image-automation-controller icon indicating copy to clipboard operation
image-automation-controller copied to clipboard

Push configuration should support spec discovery/inference from GitRepository.spec.ref.name

Open iAnomaly opened this issue 6 months ago • 0 comments

Currently, ImageUpdateAutomation push configuration only supports discovery/inference of a sourceRef.kind: GitRepository from GitRepository.spec.ref.branch. See code here: https://github.com/fluxcd/image-automation-controller/blob/main/internal/source/git.go#L158-L161

Support should be expanded to handle GitRepository.spec.ref.name such as refs/heads/main. This is especially critical for flux-operator users as the FluxInstance sync configuration via spec.sync.ref produces a GitRepository with .spec.ref.name rather than .spec.ref.branch. As such, any flux-operator user with imageupdateautomations must explicitly set spec.git.checkout.ref instead of relying on the convenience of automatic discovery/inference.

iAnomaly avatar Mar 27 '25 22:03 iAnomaly