Closed
Description
POST /api/v1beta1/replicationControllers
{
"kind": "ReplicationController",
"apiVersion": "v1beta1",
"id": "a",
"desiredState": {
"replicas": 2,
"replicaSelector": {"name": "a"},
"podTemplate": {
"desiredState": {
"manifest": {
"version": "v1beta1",
"id": "a",
"containers": [{
"name": "foo",
"image": "bar/foo",
}]
}
},
"labels": {"name": "a"}
}},
"labels": {"name": "a"}
}
That works (200)
Then, PUT the exact same body to the created URL, and get a 409 Conflict.
PUT /api/v1beta1/replicationControllers/a
{
"kind": "ReplicationController",
"apiVersion": "v1beta1",
"id": "a",
"desiredState": {
"replicas": 2,
"replicaSelector": {"name": "a"},
"podTemplate": {
"desiredState": {
"manifest": {
"version": "v1beta1",
"id": "a",
"containers": [{
"name": "foo",
"image": "bar/foo",
}]
}
},
"labels": {"name": "a"}
}},
"labels": {"name": "a"}
}
Shouldn't you be able to update the same object with the same body as you created it with?
Maybe the problem is that there are some server-added fields that I should GET before PUTting back, but then why does this return 409 while you get a 422 for doing the same thing with /services?
Activity