Giter VIP home page Giter VIP logo

Comments (4)

yannh avatar yannh commented on May 9, 2024 1

Hi @avencl , sorry for the late reply - yes, this is the intended behaviour. Sorry if the documentation was not clear!

from kubeconform.

eyarz avatar eyarz commented on May 9, 2024

You're using the -schema-location flag correctly.
I never encounter this error message and wasn't also able to find in the code what will print it.
If you will provide more details (e.g. screenshot, yamls, copy-paste command, etc.) we can debug it together :)

from kubeconform.

avencl avatar avencl commented on May 9, 2024

I managed to go around it.

The error was when i tried to use command like this:
kubeconform mapping.yaml -schema-location schema/hydra.json -schema-location schema/mapping.json i would get this error: mapping.yaml - Mapping api failed validation: could not find schema for Mapping

But when i ordered schema-location differently like this : kubeconform mapping.yaml -schema-location schema/mapping.json -schema-location schema/hydra.json everything worked fine, but when i tried to evaluate hydra files he would say they must have kind: Mapping

I think I located potential error in your code that when there are more -schema-location it only looks at first and throws error if that fails:

func (r LocalRegistry) DownloadSchema(resourceKind, resourceAPIVersion, k8sVersion string) ([]byte, error) {

The work around was (per documentation) to use command like this: kubeconform mapping.yaml -schema-location schema/{{. .ResourceKind}}.json and now everything works as intended.

from kubeconform.

eyarz avatar eyarz commented on May 9, 2024

I think this is the expected behavior 😅

from kubeconform.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.