instrumenta / instrumenta/kubeval
Invalid namespace file passes kubeval
- Dominant language
- Go
- Stars
- 3.2k
- Forks
- 227
- PR merge metrics
- No merged PRs in 30d
Description
apiVersion: v1
kind: Namespace
metadata:
creationTimestamp: null
name: Test2
spec: {}
status: {}
Trying to validate a namespace YAML file that has an invalid name.
If I apply it with dry-run=server flag it throws error "The Namespace "Test2" is invalid: metadata.name: Invalid value: "Test2": 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])?')" but kubeval doesn't detect this as an error.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the reported kubeval validation with the Namespace YAML containing metadata.name "Test2", then compare it with the Kubernetes server dry-run result. Done means kubeval reports the uppercase namespace name as invalid rather than accepting the file.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- devops
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100