mirror of
https://github.com/1Password/onepassword-operator.git
synced 2025-10-23 07:58:04 +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)
|
return createValidSecretName(value)
|
||||||
}
|
}
|
||||||
|
|
||||||
var invalidDNS1123Chars = regexp.MustCompile("[^a-z0-9-]+")
|
var invalidDNS1123Chars = regexp.MustCompile("[^a-zA-Z0-9-]+")
|
||||||
|
|
||||||
func createValidSecretName(value string) string {
|
func createValidSecretName(value string) string {
|
||||||
result := strings.ToLower(value)
|
result := invalidDNS1123Chars.ReplaceAllString(value, "-")
|
||||||
result = invalidDNS1123Chars.ReplaceAllString(result, "-")
|
|
||||||
|
|
||||||
if len(result) > kubeValidate.DNS1123SubdomainMaxLength {
|
if len(result) > kubeValidate.DNS1123SubdomainMaxLength {
|
||||||
result = result[0:kubeValidate.DNS1123SubdomainMaxLength]
|
result = result[0:kubeValidate.DNS1123SubdomainMaxLength]
|
||||||
|
Reference in New Issue
Block a user