github.com/argoproj/argo-cd/v2@v2.10.9/applicationset/services/plugin/utils.go (about) 1 package plugin 2 3 import ( 4 "fmt" 5 "strings" 6 7 "github.com/argoproj/argo-cd/v2/common" 8 ) 9 10 // ParseSecretKey retrieves secret appSetName if different from common ArgoCDSecretName. 11 func ParseSecretKey(key string) (secretName string, tokenKey string) { 12 if strings.Contains(key, ":") { 13 parts := strings.Split(key, ":") 14 secretName = parts[0][1:] 15 tokenKey = fmt.Sprintf("$%s", parts[1]) 16 } else { 17 secretName = common.ArgoCDSecretName 18 tokenKey = key 19 } 20 return secretName, tokenKey 21 }