instrumenta / kubeval

Validate your Kubernetes configuration files, supports multiple Kubernetes versions
https://kubeval.com
Other
3.16k stars 229 forks source link

Kubeval fails when resource contains '----' #52

Closed ant1441 closed 6 years ago

ant1441 commented 6 years ago

I have a configmap which contains a certificate file:

apiVersion: v1
kind: ConfigMap
metadata:
  name: kubeval-test-config
data:
  my.crt: |-
    -----BEGIN CERTIFICATE-----
    REDACTED
    -----END CERTIFICATE-----

Running kubeval against this file fails with the following error:

$ kubeval a.configmap.yaml
1 error occurred:

* Missing a kind key

I believe this is due to the multi-document YAML support (#9) erroneously splitting the document with the line ending ----.

garethr commented 6 years ago

This should be resolved in master now via #54. I'll be tidying a few things up and shipping a new release soon all being well.