chore(names): Fix resource name

Use an utility function to fix some names
This commit is contained in:
2024-11-21 11:12:38 +01:00
parent 3f63375b60
commit 3b51f41716
2 changed files with 7 additions and 1 deletions

View File

@@ -198,3 +198,9 @@ func EncodeBasicYaml(data any) ([]byte, error) {
func FixedResourceName(name string) string {
return strings.ReplaceAll(name, "_", "-")
}
// AsResourceName returns a resource name with underscores to respect the kubernetes naming convention.
// It's the opposite of FixedResourceName.
func AsResourceName(name string) string {
return strings.ReplaceAll(name, "-", "_")
}