Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Istio resources #80

Closed
grebois opened this issue Jun 6, 2018 · 9 comments
Closed

Add support for Istio resources #80

grebois opened this issue Jun 6, 2018 · 9 comments

Comments

@grebois
Copy link

grebois commented Jun 6, 2018

Considering this resource:

---
apiVersion: config.istio.io/v1alpha2
kind: RouteRule
metadata:
  name: default-pipeline-service
spec:
    destination:
      name: default-pipeline-service
    match:
        request:
          headers:
            uri:
              prefix: /api/
    rewrite:
        uri: /
---

I get:

2 errors occurred:

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

This is the API reference: https://istio.io/docs/reference/config/istio.networking.v1alpha3/

@ror6ax
Copy link

ror6ax commented Jun 25, 2018

I'd be interested to work on this.

@garethr
Copy link
Collaborator

garethr commented Aug 17, 2018

There are some details in #47 as well. This should just require generating the JSON Schemas from the Istio OpenAPI docs (I use https://github.com/garethr/openapi2jsonschema) and then including them in the right location. If someone can point me at the openapi description for Istio I might be able to add better support for CRDs in kubeval.

@tmc
Copy link

tmc commented Aug 19, 2018

Is it possible to hit a dynamic resource for this? As I do more CRD work (and work with knative, etc.) running a 'kubectl proxy' and hitting the /api endpoints there would be pretty fantastic..

@garethr
Copy link
Collaborator

garethr commented Aug 19, 2018

@tmc yes, at least theoretically. The problem there is you can only test against that specific version of the schema, and you need a server running to run the tests - which might be OK depending on your use case.

@Justin2997
Copy link

@garethr Any update on this ? Can I help ?

@Justin2997
Copy link

For people that will like Istio or other CRD like Knative I subject that skip validation for specific apiVersion that you pass to your script before running KubeVal.

@grzesuav
Copy link

hi @garethr , in general it would be useful to have possibility to add additional schemas (alongside k8s one's) - how I can see it, it could be via config file, when location for additional schemas could be placed. What do you think of it ?

My use case :

  • we use additional k8s components
  • we write own's CRD's

cheers

@Stono
Copy link

Stono commented May 21, 2019

So we can't run kubeval if there is a CRD in the helm template, it'd be great to add an --ignore-unknown-apis or something similar please!

@garethr
Copy link
Collaborator

garethr commented Jul 13, 2019

I'm going to close this as:

  1. a duplicate of cannot validate CustomResourceDefinitions #47, Istio resources are really just specific custom resources
  2. You can now at least ignore missing schemas with --ignore-missing-schemas in 0.11.0

@garethr garethr closed this as completed Jul 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants