Fix problem when several cron are declared

This commit is contained in:
2022-06-10 12:10:18 +02:00
parent fc5bdb998b
commit a5036e1b80
3 changed files with 23 additions and 15 deletions

View File

@@ -182,7 +182,9 @@ func Generate(p *compose.Parser, katernayVersion, appName, appVersion, chartVers
writers.BuildConfigMap(c, kind, n, name, templatesDir)
default:
fname := filepath.Join(templatesDir, n+"."+kind+".yaml")
name := c.(helm.Named).Name() + "-" + c.GetType()
name = PrefixRE.ReplaceAllString(name, "")
fname := filepath.Join(templatesDir, name+".yaml")
fp, err := os.Create(fname)
if err != nil {
log.Fatal(err)