diff --git a/pkg/api/v1beta3/dynakube/oneagent_props.go b/pkg/api/v1beta3/dynakube/oneagent_props.go index ce8752faa6..e1471af4ce 100644 --- a/pkg/api/v1beta3/dynakube/oneagent_props.go +++ b/pkg/api/v1beta3/dynakube/oneagent_props.go @@ -163,10 +163,6 @@ func (dk *DynaKube) CustomCodeModulesImage() string { // CustomCodeModulesVersion provides the version for the CodeModules provided in the Spec. func (dk *DynaKube) CustomCodeModulesVersion() string { - if !dk.ApplicationMonitoringMode() { - return "" - } - return dk.CustomOneAgentVersion() } diff --git a/pkg/controllers/dynakube/version/updater.go b/pkg/controllers/dynakube/version/updater.go index 68804c5c6e..6b674ed690 100644 --- a/pkg/controllers/dynakube/version/updater.go +++ b/pkg/controllers/dynakube/version/updater.go @@ -40,10 +40,9 @@ func (r *reconciler) run(ctx context.Context, updater StatusUpdater) error { } }() - customImage := updater.CustomImage() - if customImage != "" { + if currentSource == status.CustomImageVersionSource { log.Info("updating version status according to custom image", "updater", updater.Name()) - setImageIDToCustomImage(updater.Target(), customImage) + setImageIDToCustomImage(updater.Target(), updater.CustomImage()) return nil }