Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
dbba1a53
Unverified
Commit
dbba1a53
authored
Sep 26, 2018
by
k8s-ci-robot
Committed by
GitHub
Sep 26, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #68864 from roycaihw/fix-rollback-doc
Fix openapi spec and api reference: posting a rollback returns a metav1.Status
parents
769dbc66
9f78c45c
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
22 additions
and
35 deletions
+22
-35
swagger.json
api/openapi-spec/swagger.json
+6
-6
apps_v1beta1.json
api/swagger-spec/apps_v1beta1.json
+4
-4
extensions_v1beta1.json
api/swagger-spec/extensions_v1beta1.json
+4
-4
operations.html
docs/api-reference/apps/v1beta1/operations.html
+3
-3
operations.html
docs/api-reference/extensions/v1beta1/operations.html
+3
-3
BUILD
pkg/registry/apps/deployment/storage/BUILD
+0
-1
storage.go
pkg/registry/apps/deployment/storage/storage.go
+1
-2
storage_extensions.go
pkg/registry/extensions/rest/storage_extensions.go
+1
-12
No files found.
api/openapi-spec/swagger.json
View file @
dbba1a53
...
@@ -29807,19 +29807,19 @@
...
@@ -29807,19 +29807,19 @@
"200"
:
{
"200"
:
{
"description"
:
"OK"
,
"description"
:
"OK"
,
"schema"
:
{
"schema"
:
{
"$ref"
:
"#/definitions/io.k8s.api
.apps.v1beta1.Deployment
Status"
"$ref"
:
"#/definitions/io.k8s.api
machinery.pkg.apis.meta.v1.
Status"
}
}
},
},
"201"
:
{
"201"
:
{
"description"
:
"Created"
,
"description"
:
"Created"
,
"schema"
:
{
"schema"
:
{
"$ref"
:
"#/definitions/io.k8s.api
.apps.v1beta1.Deployment
Status"
"$ref"
:
"#/definitions/io.k8s.api
machinery.pkg.apis.meta.v1.
Status"
}
}
},
},
"202"
:
{
"202"
:
{
"description"
:
"Accepted"
,
"description"
:
"Accepted"
,
"schema"
:
{
"schema"
:
{
"$ref"
:
"#/definitions/io.k8s.api
.apps.v1beta1.Deployment
Status"
"$ref"
:
"#/definitions/io.k8s.api
machinery.pkg.apis.meta.v1.
Status"
}
}
},
},
"401"
:
{
"401"
:
{
...
@@ -50615,19 +50615,19 @@
...
@@ -50615,19 +50615,19 @@
"200"
:
{
"200"
:
{
"description"
:
"OK"
,
"description"
:
"OK"
,
"schema"
:
{
"schema"
:
{
"$ref"
:
"#/definitions/io.k8s.api
.extensions.v1beta1.Deployment
Status"
"$ref"
:
"#/definitions/io.k8s.api
machinery.pkg.apis.meta.v1.
Status"
}
}
},
},
"201"
:
{
"201"
:
{
"description"
:
"Created"
,
"description"
:
"Created"
,
"schema"
:
{
"schema"
:
{
"$ref"
:
"#/definitions/io.k8s.api
.extensions.v1beta1.Deployment
Status"
"$ref"
:
"#/definitions/io.k8s.api
machinery.pkg.apis.meta.v1.
Status"
}
}
},
},
"202"
:
{
"202"
:
{
"description"
:
"Accepted"
,
"description"
:
"Accepted"
,
"schema"
:
{
"schema"
:
{
"$ref"
:
"#/definitions/io.k8s.api
.extensions.v1beta1.Deployment
Status"
"$ref"
:
"#/definitions/io.k8s.api
machinery.pkg.apis.meta.v1.
Status"
}
}
},
},
"401"
:
{
"401"
:
{
api/swagger-spec/apps_v1beta1.json
View file @
dbba1a53
...
@@ -1983,7 +1983,7 @@
...
@@ -1983,7 +1983,7 @@
"description"
:
"API at /apis/apps/v1beta1"
,
"description"
:
"API at /apis/apps/v1beta1"
,
"operations"
:
[
"operations"
:
[
{
{
"type"
:
"v1
beta1.Deployment
Status"
,
"type"
:
"v1
.
Status"
,
"method"
:
"POST"
,
"method"
:
"POST"
,
"summary"
:
"create rollback of a Deployment"
,
"summary"
:
"create rollback of a Deployment"
,
"nickname"
:
"createNamespacedDeploymentRollback"
,
"nickname"
:
"createNamespacedDeploymentRollback"
,
...
@@ -2025,17 +2025,17 @@
...
@@ -2025,17 +2025,17 @@
{
{
"code"
:
200
,
"code"
:
200
,
"message"
:
"OK"
,
"message"
:
"OK"
,
"responseModel"
:
"v1
beta1.Deployment
Status"
"responseModel"
:
"v1
.
Status"
},
},
{
{
"code"
:
201
,
"code"
:
201
,
"message"
:
"Created"
,
"message"
:
"Created"
,
"responseModel"
:
"v1
beta1.Deployment
Status"
"responseModel"
:
"v1
.
Status"
},
},
{
{
"code"
:
202
,
"code"
:
202
,
"message"
:
"Accepted"
,
"message"
:
"Accepted"
,
"responseModel"
:
"v1
beta1.Deployment
Status"
"responseModel"
:
"v1
.
Status"
}
}
],
],
"produces"
:
[
"produces"
:
[
...
...
api/swagger-spec/extensions_v1beta1.json
View file @
dbba1a53
...
@@ -2153,7 +2153,7 @@
...
@@ -2153,7 +2153,7 @@
"description"
:
"API at /apis/extensions/v1beta1"
,
"description"
:
"API at /apis/extensions/v1beta1"
,
"operations"
:
[
"operations"
:
[
{
{
"type"
:
"v1
beta1.Deployment
Status"
,
"type"
:
"v1
.
Status"
,
"method"
:
"POST"
,
"method"
:
"POST"
,
"summary"
:
"create rollback of a Deployment"
,
"summary"
:
"create rollback of a Deployment"
,
"nickname"
:
"createNamespacedDeploymentRollback"
,
"nickname"
:
"createNamespacedDeploymentRollback"
,
...
@@ -2195,17 +2195,17 @@
...
@@ -2195,17 +2195,17 @@
{
{
"code"
:
200
,
"code"
:
200
,
"message"
:
"OK"
,
"message"
:
"OK"
,
"responseModel"
:
"v1
beta1.Deployment
Status"
"responseModel"
:
"v1
.
Status"
},
},
{
{
"code"
:
201
,
"code"
:
201
,
"message"
:
"Created"
,
"message"
:
"Created"
,
"responseModel"
:
"v1
beta1.Deployment
Status"
"responseModel"
:
"v1
.
Status"
},
},
{
{
"code"
:
202
,
"code"
:
202
,
"message"
:
"Accepted"
,
"message"
:
"Accepted"
,
"responseModel"
:
"v1
beta1.Deployment
Status"
"responseModel"
:
"v1
.
Status"
}
}
],
],
"produces"
:
[
"produces"
:
[
...
...
docs/api-reference/apps/v1beta1/operations.html
View file @
dbba1a53
...
@@ -2982,17 +2982,17 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
...
@@ -2982,17 +2982,17 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
<tr>
<tr>
<td
class=
"tableblock halign-left valign-top"
><p
class=
"tableblock"
>
202
</p></td>
<td
class=
"tableblock halign-left valign-top"
><p
class=
"tableblock"
>
202
</p></td>
<td
class=
"tableblock halign-left valign-top"
><p
class=
"tableblock"
>
Accepted
</p></td>
<td
class=
"tableblock halign-left valign-top"
><p
class=
"tableblock"
>
Accepted
</p></td>
<td
class=
"tableblock halign-left valign-top"
><p
class=
"tableblock"
><a
href=
"../definitions#_v1
beta1_deploymentstatus"
>
v1beta1.Deployment
Status
</a></p></td>
<td
class=
"tableblock halign-left valign-top"
><p
class=
"tableblock"
><a
href=
"../definitions#_v1
_status"
>
v1.
Status
</a></p></td>
</tr>
</tr>
<tr>
<tr>
<td
class=
"tableblock halign-left valign-top"
><p
class=
"tableblock"
>
200
</p></td>
<td
class=
"tableblock halign-left valign-top"
><p
class=
"tableblock"
>
200
</p></td>
<td
class=
"tableblock halign-left valign-top"
><p
class=
"tableblock"
>
success
</p></td>
<td
class=
"tableblock halign-left valign-top"
><p
class=
"tableblock"
>
success
</p></td>
<td
class=
"tableblock halign-left valign-top"
><p
class=
"tableblock"
><a
href=
"../definitions#_v1
beta1_deploymentstatus"
>
v1beta1.Deployment
Status
</a></p></td>
<td
class=
"tableblock halign-left valign-top"
><p
class=
"tableblock"
><a
href=
"../definitions#_v1
_status"
>
v1.
Status
</a></p></td>
</tr>
</tr>
<tr>
<tr>
<td
class=
"tableblock halign-left valign-top"
><p
class=
"tableblock"
>
201
</p></td>
<td
class=
"tableblock halign-left valign-top"
><p
class=
"tableblock"
>
201
</p></td>
<td
class=
"tableblock halign-left valign-top"
><p
class=
"tableblock"
>
Created
</p></td>
<td
class=
"tableblock halign-left valign-top"
><p
class=
"tableblock"
>
Created
</p></td>
<td
class=
"tableblock halign-left valign-top"
><p
class=
"tableblock"
><a
href=
"../definitions#_v1
beta1_deploymentstatus"
>
v1beta1.Deployment
Status
</a></p></td>
<td
class=
"tableblock halign-left valign-top"
><p
class=
"tableblock"
><a
href=
"../definitions#_v1
_status"
>
v1.
Status
</a></p></td>
</tr>
</tr>
</tbody>
</tbody>
</table>
</table>
...
...
docs/api-reference/extensions/v1beta1/operations.html
View file @
dbba1a53
...
@@ -3541,17 +3541,17 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
...
@@ -3541,17 +3541,17 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
<tr>
<tr>
<td
class=
"tableblock halign-left valign-top"
><p
class=
"tableblock"
>
202
</p></td>
<td
class=
"tableblock halign-left valign-top"
><p
class=
"tableblock"
>
202
</p></td>
<td
class=
"tableblock halign-left valign-top"
><p
class=
"tableblock"
>
Accepted
</p></td>
<td
class=
"tableblock halign-left valign-top"
><p
class=
"tableblock"
>
Accepted
</p></td>
<td
class=
"tableblock halign-left valign-top"
><p
class=
"tableblock"
><a
href=
"../definitions#_v1
beta1_deploymentstatus"
>
v1beta1.Deployment
Status
</a></p></td>
<td
class=
"tableblock halign-left valign-top"
><p
class=
"tableblock"
><a
href=
"../definitions#_v1
_status"
>
v1.
Status
</a></p></td>
</tr>
</tr>
<tr>
<tr>
<td
class=
"tableblock halign-left valign-top"
><p
class=
"tableblock"
>
200
</p></td>
<td
class=
"tableblock halign-left valign-top"
><p
class=
"tableblock"
>
200
</p></td>
<td
class=
"tableblock halign-left valign-top"
><p
class=
"tableblock"
>
success
</p></td>
<td
class=
"tableblock halign-left valign-top"
><p
class=
"tableblock"
>
success
</p></td>
<td
class=
"tableblock halign-left valign-top"
><p
class=
"tableblock"
><a
href=
"../definitions#_v1
beta1_deploymentstatus"
>
v1beta1.Deployment
Status
</a></p></td>
<td
class=
"tableblock halign-left valign-top"
><p
class=
"tableblock"
><a
href=
"../definitions#_v1
_status"
>
v1.
Status
</a></p></td>
</tr>
</tr>
<tr>
<tr>
<td
class=
"tableblock halign-left valign-top"
><p
class=
"tableblock"
>
201
</p></td>
<td
class=
"tableblock halign-left valign-top"
><p
class=
"tableblock"
>
201
</p></td>
<td
class=
"tableblock halign-left valign-top"
><p
class=
"tableblock"
>
Created
</p></td>
<td
class=
"tableblock halign-left valign-top"
><p
class=
"tableblock"
>
Created
</p></td>
<td
class=
"tableblock halign-left valign-top"
><p
class=
"tableblock"
><a
href=
"../definitions#_v1
beta1_deploymentstatus"
>
v1beta1.Deployment
Status
</a></p></td>
<td
class=
"tableblock halign-left valign-top"
><p
class=
"tableblock"
><a
href=
"../definitions#_v1
_status"
>
v1.
Status
</a></p></td>
</tr>
</tr>
</tbody>
</tbody>
</table>
</table>
...
...
pkg/registry/apps/deployment/storage/BUILD
View file @
dbba1a53
...
@@ -49,7 +49,6 @@ go_library(
...
@@ -49,7 +49,6 @@ go_library(
"//pkg/printers/internalversion:go_default_library",
"//pkg/printers/internalversion:go_default_library",
"//pkg/printers/storage:go_default_library",
"//pkg/printers/storage:go_default_library",
"//pkg/registry/apps/deployment:go_default_library",
"//pkg/registry/apps/deployment:go_default_library",
"//staging/src/k8s.io/api/apps/v1beta1:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/api/errors:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/api/errors:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library",
...
...
pkg/registry/apps/deployment/storage/storage.go
View file @
dbba1a53
...
@@ -21,7 +21,6 @@ import (
...
@@ -21,7 +21,6 @@ import (
"fmt"
"fmt"
"net/http"
"net/http"
externalappsv1beta1
"k8s.io/api/apps/v1beta1"
"k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/api/errors"
metav1
"k8s.io/apimachinery/pkg/apis/meta/v1"
metav1
"k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime"
...
@@ -149,7 +148,7 @@ func (r *RollbackREST) ProducesMIMETypes(verb string) []string {
...
@@ -149,7 +148,7 @@ func (r *RollbackREST) ProducesMIMETypes(verb string) []string {
// ProducesObject returns an object the specified HTTP verb respond with. It will overwrite storage object if
// ProducesObject returns an object the specified HTTP verb respond with. It will overwrite storage object if
// it is not nil. Only the type of the return object matters, the value will be ignored.
// it is not nil. Only the type of the return object matters, the value will be ignored.
func
(
r
*
RollbackREST
)
ProducesObject
(
verb
string
)
interface
{}
{
func
(
r
*
RollbackREST
)
ProducesObject
(
verb
string
)
interface
{}
{
return
externalappsv1beta1
.
Deployment
Status
{}
return
metav1
.
Status
{}
}
}
var
_
=
rest
.
StorageMetadata
(
&
RollbackREST
{})
var
_
=
rest
.
StorageMetadata
(
&
RollbackREST
{})
...
...
pkg/registry/extensions/rest/storage_extensions.go
View file @
dbba1a53
...
@@ -47,17 +47,6 @@ func (p RESTStorageProvider) NewRESTStorage(apiResourceConfigSource serverstorag
...
@@ -47,17 +47,6 @@ func (p RESTStorageProvider) NewRESTStorage(apiResourceConfigSource serverstorag
return
apiGroupInfo
,
true
return
apiGroupInfo
,
true
}
}
type
RollbackREST
struct
{
*
deploymentstore
.
RollbackREST
}
// override RollbackREST.ProducesObject
func
(
r
*
RollbackREST
)
ProducesObject
(
verb
string
)
interface
{}
{
return
extensionsapiv1beta1
.
DeploymentStatus
{}
}
var
_
=
rest
.
StorageMetadata
(
&
RollbackREST
{})
func
(
p
RESTStorageProvider
)
v1beta1Storage
(
apiResourceConfigSource
serverstorage
.
APIResourceConfigSource
,
restOptionsGetter
generic
.
RESTOptionsGetter
)
map
[
string
]
rest
.
Storage
{
func
(
p
RESTStorageProvider
)
v1beta1Storage
(
apiResourceConfigSource
serverstorage
.
APIResourceConfigSource
,
restOptionsGetter
generic
.
RESTOptionsGetter
)
map
[
string
]
rest
.
Storage
{
storage
:=
map
[
string
]
rest
.
Storage
{}
storage
:=
map
[
string
]
rest
.
Storage
{}
...
@@ -76,7 +65,7 @@ func (p RESTStorageProvider) v1beta1Storage(apiResourceConfigSource serverstorag
...
@@ -76,7 +65,7 @@ func (p RESTStorageProvider) v1beta1Storage(apiResourceConfigSource serverstorag
deploymentStorage
:=
deploymentstore
.
NewStorage
(
restOptionsGetter
)
deploymentStorage
:=
deploymentstore
.
NewStorage
(
restOptionsGetter
)
storage
[
"deployments"
]
=
deploymentStorage
.
Deployment
.
WithCategories
(
nil
)
storage
[
"deployments"
]
=
deploymentStorage
.
Deployment
.
WithCategories
(
nil
)
storage
[
"deployments/status"
]
=
deploymentStorage
.
Status
storage
[
"deployments/status"
]
=
deploymentStorage
.
Status
storage
[
"deployments/rollback"
]
=
&
RollbackREST
{
deploymentStorage
.
Rollback
}
storage
[
"deployments/rollback"
]
=
deploymentStorage
.
Rollback
storage
[
"deployments/scale"
]
=
deploymentStorage
.
Scale
storage
[
"deployments/scale"
]
=
deploymentStorage
.
Scale
// ingresses
// ingresses
ingressStorage
,
ingressStatusStorage
:=
ingressstore
.
NewREST
(
restOptionsGetter
)
ingressStorage
,
ingressStatusStorage
:=
ingressstore
.
NewREST
(
restOptionsGetter
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment