Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion pkg/argocd/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,10 @@ func UpdateApplication(updateConf *UpdateConfiguration, state *SyncIterationStat
result := ImageUpdaterResult{}
app := updateConf.UpdateApp.Application.GetName()
changeList := make([]ChangeEntry, 0)
prefix := updateConf.UpdateApp.Application.ObjectMeta.Annotations[fmt.Sprintf(common.RegistryPrefixAnnotation, app)]
if prefix != "" {
prefix = "/" + prefix
}

// Get all images that are deployed with the current application
applicationImages := GetImagesFromApplication(&updateConf.UpdateApp.Application)
Expand Down Expand Up @@ -183,7 +187,7 @@ func UpdateApplication(updateConf *UpdateConfiguration, state *SyncIterationStat

imgCtx.Debugf("Considering this image for update")

rep, err := registry.GetRegistryEndpoint(applicationImage.RegistryURL)
rep, err := registry.GetRegistryEndpoint(applicationImage.RegistryURL + prefix)
if err != nil {
imgCtx.Errorf("Could not get registry endpoint from configuration: %v", err)
result.NumErrors += 1
Expand Down
1 change: 1 addition & 0 deletions pkg/common/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ const (
UpdateStrategyAnnotation = ImageUpdaterAnnotationPrefix + "/%s.update-strategy"
PullSecretAnnotation = ImageUpdaterAnnotationPrefix + "/%s.pull-secret"
PlatformsAnnotation = ImageUpdaterAnnotationPrefix + "/%s.platforms"
RegistryPrefixAnnotation = ImageUpdaterAnnotationPrefix + "/%s.registry-prefix"
)

// Application-wide update strategy related annotations
Expand Down