From 48e200f142ee3e351c4ec20269090dbe269377b0 Mon Sep 17 00:00:00 2001 From: Andrei Pavlov Date: Fri, 14 Jun 2024 21:10:51 +0700 Subject: [PATCH] Rename management type to core Signed-off-by: Andrei Pavlov --- api/v1alpha1/template_types.go | 4 ++-- charts/cluster-api/Chart.yaml | 2 +- charts/hmc/Chart.yaml | 2 +- internal/controller/template_controller.go | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/api/v1alpha1/template_types.go b/api/v1alpha1/template_types.go index 92cdac7bb..482999cdc 100644 --- a/api/v1alpha1/template_types.go +++ b/api/v1alpha1/template_types.go @@ -48,8 +48,8 @@ const ( TemplateTypeDeployment TemplateType = "deployment" // TemplateTypeProvider is the type used for adding CAPI providers in the HMC Management object. TemplateTypeProvider TemplateType = "provider" - // TemplateTypeManagement is the type used for HMC management components - TemplateTypeManagement TemplateType = "management" + // TemplateTypeCore is the type used for HMC and CAPI core components + TemplateTypeCore TemplateType = "core" ) // TemplateSpec defines the desired state of Template diff --git a/charts/cluster-api/Chart.yaml b/charts/cluster-api/Chart.yaml index fca1c82a3..41e7482e5 100644 --- a/charts/cluster-api/Chart.yaml +++ b/charts/cluster-api/Chart.yaml @@ -20,4 +20,4 @@ version: 0.1.0 # It is recommended to use it with quotes. appVersion: "0.1.0" annotations: - hmc.mirantis.com/type: management + hmc.mirantis.com/type: core diff --git a/charts/hmc/Chart.yaml b/charts/hmc/Chart.yaml index 2f1e7f753..6945d5330 100644 --- a/charts/hmc/Chart.yaml +++ b/charts/hmc/Chart.yaml @@ -20,4 +20,4 @@ version: 0.1.0 # It is recommended to use it with quotes. appVersion: "0.1.0" annotations: - hmc.mirantis.com/type: management + hmc.mirantis.com/type: core diff --git a/internal/controller/template_controller.go b/internal/controller/template_controller.go index 404179300..b7877cd37 100644 --- a/internal/controller/template_controller.go +++ b/internal/controller/template_controller.go @@ -152,7 +152,7 @@ func (r *TemplateReconciler) parseChartMetadata(template *hmc.Template, chart *c } templateType := chart.Metadata.Annotations[hmc.ChartAnnotationType] switch hmc.TemplateType(templateType) { - case hmc.TemplateTypeDeployment, hmc.TemplateTypeProvider, hmc.TemplateTypeManagement: + case hmc.TemplateTypeDeployment, hmc.TemplateTypeProvider, hmc.TemplateTypeCore: default: return errNoProviderType }