-
Notifications
You must be signed in to change notification settings - Fork 114
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
Regression on 0.6.3: could not find schema due to Draft 4 being used #223
Comments
if that's the case it would be good to push this to a 0.7.0 version at least and have a changelog warning |
i guess it should use the draft version specified in the schema and only fallback to draft 4 🤔 |
I've tried with some public schemas and it works, so I'll change ours.
|
@yannh I cannot find many sources of |
I agree it would be good to have a way to have debug info in downloadschema, but I ve found it can be really verbose since well, by architecture, when you use multiple schema repositories it will try to find every file in every repository until it finds it... |
@carlossg any chance you could share the schema so I could reproduce the original issue? I feel like Kubeconform should complain if it downloads an invalid schema! |
it was this one I think {
"type": "object",
"properties": {
"spec": {
"type": "object",
"required": [],
"properties": {
"targetRef": {
"type": "object"
},
"updatePolicy": {
"type": "object",
"properties": {
"minReplicas": {
"type": "integer"
},
"updateMode": {
"type": "string"
}
},
"additionalProperties": false
},
"resourcePolicy": {
"type": "object",
"properties": {
"containerPolicies": {
"type": "array",
"items": {
"type": "object",
"properties": {
"containerName": {
"type": "string"
},
"controlledValues": {
"type": "string",
"enum": [
"RequestsAndLimits",
"RequestsOnly"
]
},
"mode": {
"type": "string",
"enum": [
"Auto",
"Off"
]
},
"minAllowed": {
"type": "object"
},
"maxAllowed": {
"type": "object"
},
"controlledResources": {
"type": "array",
"items": {
"type": "string",
"enum": [
"cpu",
"memory"
]
}
}
},
"additionalProperties": false
}
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}
}
} |
Can confirm the issue.
v0.6.2 works great and this to validate servicemonitor we use openapi2jsonschema.py to downlad and convert schemas into json. |
Here's the VPA CRD that will validate with kubeconform v0.6.3+ : https://github.com/kubernetes/autoscaler/blob/master/vertical-pod-autoscaler/deploy/vpa-v1-crd-gen.yaml |
👋 My understanding is that the schemas should be in draft 4... Am I mistaken? See #217 (comment) - I would close this ticket unless a lot of public CRDs aren't in that format? |
Hi, trying 0.6.3 I noticed a regression, caused by #221
with 0.6.3 it breaks
with 0.6.2 it worked fine
what happens is that the schema is not valid in draft 4 but it is in the default 2020 schema
from #217 (comment) I assume we need to fix our schemas to be Draft 4 ?
The text was updated successfully, but these errors were encountered: