Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kubeconform does not report invalid metadata.name #259

Open
gvfnix opened this issue Jan 31, 2024 · 1 comment
Open

Kubeconform does not report invalid metadata.name #259

gvfnix opened this issue Jan 31, 2024 · 1 comment

Comments

@gvfnix
Copy link

gvfnix commented Jan 31, 2024

Kubeconform 0.6.4

❯ kubeconform -v
development

❯ cat /tmp/ns.yml 
apiVersion: v1
kind: Namespace
metadata:
  name: NameSpaceName

❯ kubeconform -verbose /tmp/ns.yml 
/tmp/ns.yml - Namespace NameSpaceName is valid

❯ kubectl apply -f /tmp/ns.yml 
The Namespace "NameSpaceName" is invalid: metadata.name: Invalid value: "NameSpaceName": a lowercase RFC 1123 label must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character (e.g. 'my-name',  or '123-abc', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?')

Kubeconform should not allow this.

@jfcoz
Copy link

jfcoz commented Mar 12, 2024

This also happens when metadata.name is too long :

metadata.name: Invalid value: "…-toooo-long": must be no more than 52 characters

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants