kubeval icon indicating copy to clipboard operation
kubeval copied to clipboard

volumeMounts names are not checked correctly

Open michael-todorovic opened this issue 4 years ago • 0 comments

Hello, It could be somehow related to #116 as it's about naming volumeMounts. I made a volumeMount named cronjobConfig, kubeval said everything is ok but k8s didn't agree with the following:

Error: CronJob.batch "blah" is invalid: [spec.jobTemplate.spec.template.spec.volumes[0].name: Invalid value: "cronjobConfig": a DNS-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?'), spec.jobTemplate.spec.template.spec.containers[0].volumeMounts[0].name: Not found: "cronjobConfig"]

I'm using kubeval:

Version: 0.14.0 Commit: eae975a0031c57f01976474f428861f50cfc551e Date: 2019-09-01T10:07:06Z

Thanks for your great tool :)

michael-todorovic avatar Nov 20 '19 07:11 michael-todorovic