From 800c135614f4867f1a0ac572779feda534e939d0 Mon Sep 17 00:00:00 2001 From: Andrei Pavlov Date: Fri, 18 Oct 2024 23:57:54 +0700 Subject: [PATCH 1/2] Fix initial release creation Signed-off-by: Andrei Pavlov --- internal/controller/release_controller.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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, } From fd016ecd25004936e324e5d899b07e1813d994c0 Mon Sep 17 00:00:00 2001 From: Andrei Pavlov Date: Sat, 19 Oct 2024 00:17:54 +0700 Subject: [PATCH 2/2] Fix version trimming in Makefile Signed-off-by: Andrei Pavlov --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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