--docker-email
validation does not allow for '@' #129597
Open
Description
What happened?
PS C:\Users\trisavo> kubectl create secret docker-registry --docker-username trisavoconnected --docker-password $TOKEN_PWD --docker-email trisavo@microsoft.com --docker-server=10.96.0.3
error: failed to create secret Secret "trisavo@microsoft.com" is invalid: metadata.name: Invalid value: "trisavo@microsoft.com": a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')
Seems the validation for email only allows for . and - characters. Is this expected?
What did you expect to happen?
I expected to be able to use my email for docker-email.
How can we reproduce it (as minimally and precisely as possible)?
Use the kubectl create secret command.
Anything else we need to know?
No response
Kubernetes version
$ kubectl version
# paste output here
Client Version: v1.30.5
Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3
Server Version: v1.32.0
Cloud provider
Azure
OS version
# On Linux:
$ cat /etc/os-release
# paste output here
$ uname -a
# paste output here
# On Windows:
C:\> wmic os get Caption, Version, BuildNumber, OSArchitecture
# paste output here
BuildNumber Caption OSArchitecture Version
22631 Microsoft Windows 11 Enterprise N 64-bit 10.0.22631