diff --git a/Makefile b/Makefile index 9222b7c1b..f09b3be96 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,6 @@ NAMESPACE ?= hmc-system -VERSION ?= $(patsubst v%,%,$(shell git describe --tags --always)) +VERSION ?= $(shell git describe --tags --always) +VERSION := $(patsubst v%,%,$(VERSION)) FQDN_VERSION = $(subst .,-,$(VERSION)) # Image URL to use all building/pushing image targets IMG ?= hmc/controller:latest diff --git a/internal/controller/release_controller.go b/internal/controller/release_controller.go index 79ac14676..0ff94cb18 100644 --- a/internal/controller/release_controller.go +++ b/internal/controller/release_controller.go @@ -192,6 +192,7 @@ func (r *ReleaseReconciler) reconcileHMCTemplates(ctx context.Context, releaseNa l.Info("Initial creation of HMC Release is skipped") return nil } + initialInstall := releaseName == "" var ownerRefs []metav1.OwnerReference if releaseName == "" { releaseName = utils.ReleaseNameFromVersion(build.Version) @@ -252,7 +253,7 @@ func (r *ReleaseReconciler) reconcileHMCTemplates(ctx context.Context, releaseNa }, } - if releaseName == "" { + if initialInstall { createReleaseValues := map[string]any{ "createRelease": true, }