Skip to content

Commit

Permalink
Allow custom version for cloudnative (#4110)
Browse files Browse the repository at this point in the history
Co-authored-by: Marcell Sevcsik <[email protected]>
  • Loading branch information
gkrenn and 0sewa0 authored Nov 28, 2024
1 parent 6fa8b52 commit c282f37
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
4 changes: 0 additions & 4 deletions pkg/api/v1beta3/dynakube/oneagent_props.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}

Expand Down
5 changes: 2 additions & 3 deletions pkg/controllers/dynakube/version/updater.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit c282f37

Please sign in to comment.