2023-12-06 15:24:02 +01:00
|
|
|
package generator
|
|
|
|
|
|
|
|
import (
|
|
|
|
_ "embed"
|
|
|
|
"strings"
|
2025-08-19 23:09:50 +02:00
|
|
|
|
2025-08-19 23:58:51 +02:00
|
|
|
"katenary.io/internal/generator/labels"
|
2023-12-06 15:24:02 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
// helmHelper is a template for the _helpers.tpl file in the chart templates directory.
|
|
|
|
//
|
|
|
|
//go:embed helmHelper.tpl
|
|
|
|
var helmHelper string
|
|
|
|
|
|
|
|
// Helper returns the _helpers.tpl file for a chart.
|
|
|
|
func Helper(name string) string {
|
|
|
|
helmHelper := strings.ReplaceAll(helmHelper, "__APP__", name)
|
2024-11-18 17:12:12 +01:00
|
|
|
helmHelper = strings.ReplaceAll(helmHelper, "__PREFIX__", labels.KatenaryLabelPrefix)
|
2023-12-06 15:24:02 +01:00
|
|
|
helmHelper = strings.ReplaceAll(helmHelper, "__VERSION__", "0.1.0")
|
|
|
|
return helmHelper
|
|
|
|
}
|