github.com/argoproj/argo-cd@v1.8.7/util/argo/normalizers/util.go (about) 1 package normalizers 2 3 import ( 4 "fmt" 5 "strings" 6 ) 7 8 func getGroupKindForOverrideKey(key string) (string, string, error) { 9 var group, kind string 10 parts := strings.Split(key, "/") 11 12 if len(parts) == 2 { 13 group = parts[0] 14 kind = parts[1] 15 } else if len(parts) == 1 { 16 kind = parts[0] 17 } else { 18 return "", "", fmt.Errorf("override key must be <group>/<kind> or <kind>, got: '%s' ", key) 19 } 20 return group, kind, nil 21 }