Skip to content

Relax name length restriction for Secrets/ConfigMaps.#1528

Merged
openshift-merge-robot merged 1 commit intocontainers:mainfrom
rhatdan:config
Jun 29, 2023
Merged

Relax name length restriction for Secrets/ConfigMaps.#1528
openshift-merge-robot merged 1 commit intocontainers:mainfrom
rhatdan:config

Conversation

@rhatdan
Copy link
Member

@rhatdan rhatdan commented Jun 27, 2023

The Kubernetes documentation states that the name of these resources much be a DNS subdomain name, which it defines1 as being up to 253 characters.

Following the referenced RFC it does appear that the name should be further restricted to require the 253 characters be made up of multiple of multiple 63-character labels separated by dots. The Kubernetes2 validation code does not apply this label restriction though, and will accept names longer than 63 characters.

This commit adjusts the length limits to match.

Completes: #1494

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 27, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rhatdan

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

The Kubernetes documentation states that the name of these resources
much be a DNS subdomain name, which it defines[1] as being up to 253
characters.

Following the referenced RFC it does appear that the name should be
further restricted to require the 253 characters be made up of multiple
of multiple 63-character labels separated by dots. The Kubernetes[2]
validation code does not apply this label restriction though, and will
accept names longer than 63 characters.

This commit adjusts the length limits to match.

[1]: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#dns-subdomain-names
[2]: https://github.com/kubernetes/apimachinery/blob/6b1428efc73348cc1c33935f3a39ab0f2f01d23d/pkg/util/validation/validation.go#L215

Completes: containers#1494

Signed-off-by: Kenny MacDermid <kenny@macdermid.ca>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
@rhatdan
Copy link
Member Author

rhatdan commented Jun 29, 2023

@containers/podman-maintainers PTAL

@ashley-cui
Copy link
Member

LGTM

@lsm5
Copy link
Member

lsm5 commented Jun 29, 2023

/lgtm

@openshift-ci openshift-ci bot added the lgtm label Jun 29, 2023
@openshift-merge-robot openshift-merge-robot merged commit def8165 into containers:main Jun 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants