Comments (4)
Hi @avencl , sorry for the late reply - yes, this is the intended behaviour. Sorry if the documentation was not clear!
from kubeconform.
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.
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:
kubeconform/pkg/registry/local.go
Line 23 in 7bf1e01
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.
I think this is the expected behavior 😅
from kubeconform.
Related Issues (20)
- Performance decrease since 0.6.x HOT 4
- better error message HOT 6
- "msg": "lstat kubeconfigs/: no such file or directory" HOT 4
- multiple args format HOT 1
- Unable to use the CRD example schema HOT 6
- Was 0.6.2 retagged? HOT 3
- Kubeconform does not detect manifests that are too large. HOT 4
- Support providing preloaded schemas HOT 1
- kubeconform could not find schema for HTTPProxy since v0.6.0 HOT 7
- Error in Job schema in version >= 1.25 HOT 4
- Regression on 0.6.3: could not find schema due to Draft 4 being used HOT 10
- missing exception for x-kubernetes-preserve-unknown-fields HOT 1
- How to use with envsubst? HOT 2
- could not find schema for SecretProviderClass" HOT 2
- Exit code incorrect when path does not exists HOT 2
- Failure building with go 1.21 HOT 3
- Zero exit code on malformed yamls HOT 5
- kubernetes-json-schema cron is running out of disk space and failing HOT 3
- kubeconform does not detect invalid names (eg contain underscore) HOT 1
- Support Validation rules
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kubeconform.