From bbb1c1767e6a56f648404a8f7f0ea593ac09e025 Mon Sep 17 00:00:00 2001 From: Zheng Xi Zhou Date: Thu, 25 Nov 2021 11:06:08 +0800 Subject: [PATCH] Fix: remove `.cue` suffix from the component name of observability (#2796) If the component name has a suffix `.cue`, it will hit issue of not match a DNS name --- pkg/addon/addon.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/addon/addon.go b/pkg/addon/addon.go index b3ba2a2ec..c3d53ad30 100644 --- a/pkg/addon/addon.go +++ b/pkg/addon/addon.go @@ -501,6 +501,9 @@ func RenderApplication(addon *types.Addon, args map[string]interface{}) (*v1beta if err != nil { return nil, nil, ErrRenderCueTmpl } + if addon.Name == "observability" && strings.HasSuffix(comp.Name, ".cue") { + comp.Name = strings.Split(comp.Name, ".cue")[0] + } app.Spec.Components = append(app.Spec.Components, *comp) }