Skip to content

--docker-email validation does not allow for '@' #129597

Open
@trisavo-msft

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

Install tools

Container runtime (CRI) and version (if applicable)

Related plugins (CNI, CSI, ...) and versions (if applicable)

Metadata

Assignees

No one assigned

    Labels

    kind/supportCategorizes issue or PR as a support question.needs-sigIndicates an issue or PR lacks a `sig/foo` label and requires one.needs-triageIndicates an issue or PR lacks a `triage/foo` label and requires one.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions