Closed nicksnyder closed 5 years ago
An additional case that I ran into was kubeval being ok with a deployment yaml, but kubectl gave me this complaint:
env[3].valueFrom.secretKeyRef.name: Invalid value: "aws_sdk": a DNS-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])?)*')
The yml fragment:
- name: aws_sdk_secret_access_key
valueFrom:
secretKeyRef:
name: aws_sdk
key: secret_access_key
I used underscores in a lot of other places that I should not have, so possibly worthwhile.
Trying this out with the latest version of Kubeval this fails with the following:
The document bob.yaml contains an invalid Deployment
---> spec.template.spec: Invalid type. Expected: object, given: null
I'll close this issue now but feel free to reopen if you still have an issue and can provide more details.
Consider this (invalid) deployment.
kubectl complains
kubeval doesn't
I expect kubeval to complain.
More meta question, does kubeval validate things that
kubectl --validate
doesn't?