From 8aee6d9983c4fab1139864c23d28ca18fa24bdd2 Mon Sep 17 00:00:00 2001 From: Patrice Ferlet Date: Fri, 22 Nov 2024 16:11:55 +0100 Subject: [PATCH] fix(nil): The service can not exist --- generator/generator.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/generator/generator.go b/generator/generator.go index 88f5444..a96fb5f 100644 --- a/generator/generator.go +++ b/generator/generator.go @@ -155,7 +155,9 @@ func Generate(project *types.Project) (*HelmChart, error) { for _, s := range podToMerge { // get the target service target := services[s.Name] - delete(chart.Templates, target.Filename()) + if target != nil { + delete(chart.Templates, target.Filename()) + } } // compute all needed resplacements in YAML templates