—
You are receiving this because you are on a team that was mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale
.
Stale issues rot after an additional 30d of inactivity and eventually close.
Prevent issues from auto-closing with an /lifecycle frozen
comment.
If this issue is safe to close now please do so with /close
.
Send feedback to sig-testing, kubernetes/test-infra and/or @fejta
.
/lifecycle stale
/remove-lifecycle stale
/lifecycle frozen
Hi @thockin, @smarterclayton, @bgrant0607
This issue has been open for a while, so I'm just checking to see if it is still an issue or not in the latest version.
It looks like there currently are some useful error messages given when there are problems with the json. Do you think these are sufficient or is something more detailed needed?
Here is what I tried, using kubectl v1.18.0:
Test 1: Invalid json (removed " before metadata)
kubectl create -f - << EOF
{
"kind": "Pod",
"apiVersion": "v1",
metadata": {
"name": "nginx"
},
"spec": {
"containers": [
{
"name": "nginx",
"image": "nginx"
}
],
"restartPolicy": "Never"
}
}
EOF
error: error parsing STDIN: json: line 3: invalid character 'm' looking for beginning of object key string
Test 2: Json is valid but does not conform (changed spec to xspec)
kubectl create -f - << EOF
{
"kind": "Pod",
"apiVersion": "v1",
"metadata": {
"name": "nginx"
},
"xspec": {
"containers": [
{
"name": "nginx",
"image": "nginx"
}
],
"restartPolicy": "Never"
}
}
EOF
error: error validating "STDIN": error validating data: ValidationError(Pod): unknown field "xspec" in io.k8s.api.core.v1.Pod; if you choose to ignore these errors, turn validation off with --validate=false
—
You are receiving this because you are on a team that was mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
Thanks. I think we can close this.
/close
Closed #6132.
@bgrant0607: Closing this issue.
In response to this:
Thanks. I think we can close this.
/close
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.