@@ -38,9 +38,9 @@ var regionRegex = regexp.MustCompile(`^[a-z0-9]+$`)
3838// Pattern: lowercase letters/digits followed by digits, dash, then digit(s) (e.g., eu01-1, eu01-2)
3939var availabilityZoneRegex = regexp .MustCompile (`^[a-z0-9]+-\d+$` )
4040
41- // labelKeyRegex validates Kubernetes label keys (must start/end with alphanumeric, can contain -, _, .)
41+ // labelKeyRegex validates Kubernetes label keys (must start/end with alphanumeric, can contain -, _, ., / )
4242// Maximum length: 63 characters
43- var labelKeyRegex = regexp .MustCompile (`^[a-zA-Z0-9]([-a-zA-Z0-9_.]*[a-zA-Z0-9])?$` )
43+ var labelKeyRegex = regexp .MustCompile (`^[a-zA-Z0-9]([-a-zA-Z0-9_./ ]*[a-zA-Z0-9])?$` )
4444
4545// labelValueRegex validates Kubernetes label values (must start/end with alphanumeric, can contain -, _, ., can be empty)
4646// Maximum length: 63 characters
@@ -113,7 +113,7 @@ func ValidateProviderSpecNSecret(spec *api.ProviderSpec, secrets *corev1.Secret)
113113 errors = append (errors , fmt .Errorf ("providerSpec.labels key '%s' exceeds maximum length of 63 characters" , key ))
114114 }
115115 if ! labelKeyRegex .MatchString (key ) {
116- errors = append (errors , fmt .Errorf ("providerSpec.labels key '%s' has invalid format (must start/end with alphanumeric, can contain -, _, .)" , key ))
116+ errors = append (errors , fmt .Errorf ("providerSpec.labels key '%s' has invalid format (must start/end with alphanumeric, can contain -, _, ., / )" , key ))
117117 }
118118 if len (value ) > 63 {
119119 errors = append (errors , fmt .Errorf ("providerSpec.labels value for key '%s' exceeds maximum length of 63 characters" , key ))
0 commit comments