...

Source file src/edge-infra.dev/pkg/k8s/meta/name.go

Documentation: edge-infra.dev/pkg/k8s/meta

     1  package meta
     2  
     3  import (
     4  	"strings"
     5  )
     6  
     7  // ToK8sName returns a modified version of the string given that can be
     8  // used as a value for the k8s file metadata.name
     9  func ToK8sName(name string) string {
    10  	n := strings.ToLower(name)
    11  	n = strings.ReplaceAll(n, " ", "-")
    12  	n = strings.ReplaceAll(n, "_", "-")
    13  	return n
    14  }
    15  

View as plain text