[joe@ose3-master content]$ oc create -f test-complete.json --validate
error validating data: couldn't find type: v1.List
[joe@ose3-master content]$ oc version
oc v0.6.1.0-74-g285e75f
kubernetes v0.17.1-804-g496be63
{
"kind": "List",
"apiVersion": "v1",
"metadata": {
"name": "hello-service-complete-example"
},
"items": [
{
"kind": "Service",
"apiVersion": "v1",
"metadata": {
"name": "hello-openshift-service"
},
"spec": {
"selector": {
"name": "hello-openshift"
},
"ports": [
{
"protocol": "TCP",
"port": 27017,
"targetPort": 8080
}
]
}
},
{
"kind": "Route",
"apiVersion": "v1",
"metadata": {
"name": "hello-openshift-route"
},
"spec": {
"host": "hello-openshift.cloudapps.example.com",
"to": {
"name": "hello-openshift-service"
},
"tls": {
"termination": "edge"
}
}
},
{
"kind": "DeploymentConfig",
"apiVersion": "v1",
"metadata": {
"name": "hello-openshift"
},
"spec": {
"strategy": {
"type": "Recreate",
"resources": {}
},
"triggers": [
{
"type": "ConfigChange"
}
],
"replicas": 1,
"selector": {
"name": "hello-openshift"
},
"template": {
"metadata": {
"creationTimestamp": null,
"labels": {
"name": "hello-openshift"
}
},
"spec": {
"containers": [
{
"name": "hello-openshift",
"image": "openshift/hello-openshift:v0.4.3",
"ports": [
{
"name": "hello-openshift-tcp-8080",
"containerPort": 8080,
"protocol": "TCP"
}
],
"resources": {
"limits": {
"cpu": "10m",
"memory": "16Mi"
}
},
"terminationMessagePath": "/dev/termination-log",
"imagePullPolicy": "PullIfNotPresent",
"capabilities": {},
"securityContext": {
"capabilities": {},
"privileged": false
},
"livenessProbe": {
"tcpSocket": {
"port": 8080
},
"timeoutSeconds": 1,
"initialDelaySeconds": 10
}
}
],
"restartPolicy": "Always",
"dnsPolicy": "ClusterFirst",
"serviceAccount": "",
"nodeSelector": {
"region": "primary"
}
}
}
}
}
]
}
The issue here is the --validate logic pulls the swagger list of api endpoints and "List" is not an api endpoint. it's a valid object, but not a valid endpoint. the --validate logic needs to be enhanced. I think we can consider this not a blocker though.
Validate is poorly designed
I believe this was fixed in upstream.
well, it's "better" in that it doesn't complain about List anymore, but it does complain about all the openshift specific resources:
$ oc process -f application-template-stibuild.json | oc create -f - --validate
error: error validating "STDIN": error validating data: [couldn't find type: v1.Route, couldn't find type: v1.ImageStream, couldn't find type: v1.ImageStream, couldn't find type: v1.BuildConfig, couldn't find type: v1.DeploymentConfig, couldn't find type: v1.DeploymentConfig]; if you choose to ignore these errors, turn validation off with --validate=false
so i think this should be left open.
Issues go stale after 90d of inactivity.
Mark the issue as fresh by commenting /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
Exclude this issue from closing by commenting /lifecycle frozen.
If this issue is safe to close now please do so with /close.
/lifecycle stale
Stale issues rot after 30d of inactivity.
Mark the issue as fresh by commenting /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.
Exclude this issue from closing by commenting /lifecycle frozen.
If this issue is safe to close now please do so with /close.
/lifecycle rotten
/remove-lifecycle stale
Rotten issues close after 30d of inactivity.
Reopen the issue by commenting /reopen.
Mark the issue as fresh by commenting /remove-lifecycle rotten.
Exclude this issue from closing again by commenting /lifecycle frozen.
/close
Most helpful comment
well, it's "better" in that it doesn't complain about List anymore, but it does complain about all the openshift specific resources:
so i think this should be left open.