Skip to content

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

Open
@trisavo-msft

Description

@trisavo-msft

What happened?

PS C:\Users\trisavo> kubectl create secret docker-registry --docker-username trisavoconnected --docker-password $TOKEN_PWD --docker-email [email protected] --docker-server=10.96.0.3
error: failed to create secret Secret "[email protected]" is invalid: metadata.name: Invalid value: "[email protected]": 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

Metadata

Assignees

No one assigned

    Labels

    kind/supportCategorizes issue or PR as a support question.lifecycle/staleDenotes an issue or PR has remained open with no activity and has become stale.needs-triageIndicates an issue or PR lacks a `triage/foo` label and requires one.sig/cliCategorizes an issue or PR as relevant to SIG CLI.

    Type

    No type

    Projects

    Status

    Needs Triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions