mirror of
https://github.com/1Password/onepassword-operator.git
synced 2025-10-22 07:28:06 +00:00
Do not make secret names lowercase on normalization
This commit is contained in:
@@ -97,11 +97,10 @@ func formatSecretName(value string) string {
|
||||
return createValidSecretName(value)
|
||||
}
|
||||
|
||||
var invalidDNS1123Chars = regexp.MustCompile("[^a-z0-9-]+")
|
||||
var invalidDNS1123Chars = regexp.MustCompile("[^a-zA-Z0-9-]+")
|
||||
|
||||
func createValidSecretName(value string) string {
|
||||
result := strings.ToLower(value)
|
||||
result = invalidDNS1123Chars.ReplaceAllString(result, "-")
|
||||
result := invalidDNS1123Chars.ReplaceAllString(value, "-")
|
||||
|
||||
if len(result) > kubeValidate.DNS1123SubdomainMaxLength {
|
||||
result = result[0:kubeValidate.DNS1123SubdomainMaxLength]
|
||||
|
Reference in New Issue
Block a user