instrumenta / kubeval

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

Not catching incorrect property names #39

Closed MitchLillie closed 6 years ago

MitchLillie commented 6 years ago

To reproduce:

  1. Create a deployment.yml with the following:

    apiVersion: extensions/v1beta1
    kind: Deployment
    metadata:
    name: rfq-explorer
    spec:
    type: RollingUpdate
  2. Run kubeval deployment.yml

  3. The document deployment.yml contains a valid Deployment

Expected:

  1. ---> spec.type: Unknown property. Or something along those lines
garethr commented 6 years ago

@MitchLillie could you try running Kubeval with the --strict flag and report back if that resolves your issue? The Kubernetes API is actually completely fine with you sending unknown properties, however kubectl layers on top of that some additional behaviour.

garethr commented 6 years ago

I'll close this issue for now, as I think strict should work for what you're trying to do.