instrumenta / kubeval

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

Unable to validate due to problem loading schema from Github #66

Closed Yggdrasil closed 6 years ago

Yggdrasil commented 6 years ago

With the current latest kubeval 0.7.1 (from Homebrew) I get the following error:

$ kubeval example.yaml
1 error occurred:

* Problem loading schema from the network at https://raw.githubusercontent.com/garethr/kubernetes-json-schema/master/master-standalone/issuer.json: Could not read schema from HTTP, response status is 404 Not Found

Checking the mentioned URL in a browser indeed returns a 404 as well.

guusvw commented 6 years ago

:+1: same for me

garethr commented 6 years ago

Could you provide the Kubernetes config file you're seeing this fail with? I don't see issuer as a resource type in the OpenAPI description of the API https://raw.githubusercontent.com/kubernetes/kubernetes/master/api/openapi-spec/swagger.json

Yggdrasil commented 6 years ago

I was trying to validate yaml for certmanager, the automated TLS certificate thing.

It was similar to this:

apiVersion: certmanager.k8s.io/v1alpha1
kind: Issuer
metadata:
  name: letsencrypt-staging
  namespace: default
spec:
  acme:
    # The ACME server URL
    server: https://acme-staging.api.letsencrypt.org/directory
    # Email address used for ACME registration
    email: user@example.com
    # Name of a secret used to store the ACME account private key
    privateKeySecretRef:
      name: letsencrypt-staging
    # Enable the HTTP-01 challenge provider
    http01: {}

Source: https://github.com/jetstack/cert-manager/blob/master/docs/user-guides/acme-http-validation.md

garethr commented 6 years ago

@Yggdrasil ah, at present kuveval doesn't support custom resources. I'll close this as I'm tracking that in #47. Thanks for the details.