From 29b83d475b1cb089228d2ff6dc3eb0b0f8828dc6 Mon Sep 17 00:00:00 2001 From: zhouhao_yewu Date: Sat, 12 Oct 2024 10:11:18 +0800 Subject: [PATCH] fix: fix component parmeter config invalid Signed-off-by: zhouhao_yewu --- pkg/kubenest/tasks/manifests_components.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pkg/kubenest/tasks/manifests_components.go b/pkg/kubenest/tasks/manifests_components.go index b5179ccab..6b59d9866 100644 --- a/pkg/kubenest/tasks/manifests_components.go +++ b/pkg/kubenest/tasks/manifests_components.go @@ -95,6 +95,9 @@ func applyComponentsManifests(r workflow.RunData) error { templatedMapping["KUBE_PROXY_KUBECONFIG"] = string(secret.Data[constants.KubeConfig]) imageRepository, _ := util.GetImageMessage() templatedMapping["ImageRepository"] = imageRepository + for k, v := range data.PluginOptions() { + templatedMapping[k] = v + } keepalivedEnable := data.VipMap() != nil && data.VipMap()[constants.VcVipStatusKey] != "" if keepalivedEnable { templatedMapping["Vip"] = data.VipMap()[constants.VcVipStatusKey] @@ -103,9 +106,7 @@ func applyComponentsManifests(r workflow.RunData) error { if nodeCount < constants.VipKeepAlivedReplicas { keepalivedReplicas = int(nodeCount) } - for k, v := range data.PluginOptions() { - templatedMapping[k] = v - } + templatedMapping["KeepalivedReplicas"] = keepalivedReplicas }