8000 Incorrect max length check on metadata.name · Issue #79351 · kubernetes/kubernetes · GitHub
[go: up one dir, main page]

Skip to content

Incorrect max length check on metadata.name #79351

@stevebail

Description

@stevebail

What happened:
As far as I know metadata.name can be one or more DNS labels separated by dots (.) with the following constraints on max length: 1) each label has a max length of 63 characters 2) the maximum number of characters for the name (aka DNS subdomain) is 253 characters.

I did a couple of tests using v1.15.0 and max length for label is not respected

What you expected to happen:
I was able to successfully create a pod with a name with a single label with 64 and 72 characters.
See pod-name-15.pdf for example of manifest YAML file.
kubectl responded as follows:
pod/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx64 created

The expected outcome is an error.

pod-name-15.pdf

How to reproduce it (as minimally and precisely as possible):

Anything else we need to know?:

Environment:

  • Kubernetes version (use kubectl version): v1.15.0
  • Cloud provider or hardware configuration:
  • OS (e.g: cat /etc/os-release):
  • Kernel (e.g. uname -a):
  • Install tools:
  • Network plugin and version (if this is a network-related bug):
  • Others:

@kubernetes/sig-cli
/sig cli

@kubernetes/sig-api-machinery
/sig api-machinery

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugCategorizes issue or PR as related to a bug.kind/documentationCategorizes issue or PR as related to documentation.lifecycle/rottenDenotes an issue or PR that has aged beyond stale and will be auto-closed.sig/api-machineryCategorizes an issue or PR as relevant to SIG API Machinery.sig/cliCategorizes an issue or PR as relevant to SIG CLI.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0