Merge pull request #49340 from janetkuo/apps-v1beta2-dep-rollback

Automatic merge from submit-queue

Deprecate Deployment .spec.rollbackTo field 

~Depends on #48746~ (merged)
xref: #46934, #49135

1. Deprecate Deployment field `.spec.rollbackTo` in `extensions/v1beta1` and `apps/v1beta1`, and remove the same field and `/rollback` endpoint from `apps/v1beta2` Deployment. 
1. Add an annotation `deprecated.deployment.rollback.to` in `apps/v1beta2` for conversion to/from other versions. 

Note: `apps/v1beta2` is new in 1.8 (and WIP), so it is okay to make breaking changes to it. 

```release-note
Deprecate Deployment .spec.rollbackTo field 
```
This commit is contained in:
Kubernetes Submit Queue 2017-08-08 18:15:38 -07:00 committed by GitHub
commit 2bd2127390
28 changed files with 2766 additions and 3855 deletions

View File

@ -23906,78 +23906,6 @@
}
]
},
"/apis/apps/v1beta2/namespaces/{namespace}/deployments/{name}/rollback": {
"post": {
"description": "create rollback of a Deployment",
"consumes": [
"*/*"
],
"produces": [
"application/json",
"application/yaml",
"application/vnd.kubernetes.protobuf"
],
"schemes": [
"https"
],
"tags": [
"apps_v1beta2"
],
"operationId": "createAppsV1beta2NamespacedDeploymentRollback",
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/io.k8s.api.apps.v1beta2.DeploymentRollback"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/io.k8s.api.apps.v1beta2.DeploymentRollback"
}
},
"401": {
"description": "Unauthorized"
}
},
"x-kubernetes-action": "post",
"x-kubernetes-group-version-kind": {
"group": "apps",
"kind": "DeploymentRollback",
"version": "v1beta2"
}
},
"parameters": [
{
"uniqueItems": true,
"type": "string",
"description": "name of the DeploymentRollback",
"name": "name",
"in": "path",
"required": true
},
{
"uniqueItems": true,
"type": "string",
"description": "object name and auth scope, such as for teams and projects",
"name": "namespace",
"in": "path",
"required": true
},
{
"uniqueItems": true,
"type": "string",
"description": "If 'true', then the output is pretty printed.",
"name": "pretty",
"in": "query"
}
]
},
"/apis/apps/v1beta2/namespaces/{namespace}/deployments/{name}/scale": {
"get": {
"description": "read scale of the specified Deployment",
@ -51264,7 +51192,7 @@
]
},
"io.k8s.api.apps.v1beta1.DeploymentRollback": {
"description": "DeploymentRollback stores the information required to rollback a deployment.",
"description": "DEPRECATED. DeploymentRollback stores the information required to rollback a deployment.",
"required": [
"name",
"rollbackTo"
@ -51333,7 +51261,7 @@
"format": "int32"
},
"rollbackTo": {
"description": "The config this deployment is rolling back to. Will be cleared after rollback is done.",
"description": "DEPRECATED. The config this deployment is rolling back to. Will be cleared after rollback is done.",
"$ref": "#/definitions/io.k8s.api.apps.v1beta1.RollbackConfig"
},
"selector": {
@ -51413,6 +51341,7 @@
}
},
"io.k8s.api.apps.v1beta1.RollbackConfig": {
"description": "DEPRECATED.",
"properties": {
"revision": {
"description": "The revision to rollback to. If set to 0, rollback to the last revision.",
@ -51942,45 +51871,6 @@
}
]
},
"io.k8s.api.apps.v1beta2.DeploymentRollback": {
"description": "WIP: This is not ready to be used and we plan to make breaking changes to it. DeploymentRollback stores the information required to rollback a deployment.",
"required": [
"name",
"rollbackTo"
],
"properties": {
"apiVersion": {
"description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources",
"type": "string"
},
"kind": {
"description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds",
"type": "string"
},
"name": {
"description": "Required: This must match the Name of a deployment.",
"type": "string"
},
"rollbackTo": {
"description": "The config of this deployment rollback.",
"$ref": "#/definitions/io.k8s.api.apps.v1beta2.RollbackConfig"
},
"updatedAnnotations": {
"description": "The annotations to be updated to a deployment",
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"x-kubernetes-group-version-kind": [
{
"group": "apps",
"kind": "DeploymentRollback",
"version": "v1beta2"
}
]
},
"io.k8s.api.apps.v1beta2.DeploymentSpec": {
"description": "WIP: This is not ready to be used and we plan to make breaking changes to it. DeploymentSpec is the specification of the desired behavior of the Deployment.",
"required": [
@ -52011,10 +51901,6 @@
"type": "integer",
"format": "int32"
},
"rollbackTo": {
"description": "The config this deployment is rolling back to. Will be cleared after rollback is done.",
"$ref": "#/definitions/io.k8s.api.apps.v1beta2.RollbackConfig"
},
"selector": {
"description": "Label selector for pods. Existing ReplicaSets whose pods are selected by this will be the ones affected by this deployment.",
"$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector"
@ -52251,16 +52137,6 @@
}
}
},
"io.k8s.api.apps.v1beta2.RollbackConfig": {
"description": "WIP: This is not ready to be used and we plan to make breaking changes to it.",
"properties": {
"revision": {
"description": "The revision to rollback to. If set to 0, rollback to the last revision.",
"type": "integer",
"format": "int64"
}
}
},
"io.k8s.api.apps.v1beta2.RollingUpdateDaemonSet": {
"description": "WIP: This is not ready to be used and we plan to make breaking changes to it. Spec to control the desired behavior of daemon set rolling update.",
"properties": {
@ -58688,7 +58564,7 @@
]
},
"io.k8s.api.extensions.v1beta1.DeploymentRollback": {
"description": "DeploymentRollback stores the information required to rollback a deployment.",
"description": "DEPRECATED. DeploymentRollback stores the information required to rollback a deployment.",
"required": [
"name",
"rollbackTo"
@ -58757,7 +58633,7 @@
"format": "int32"
},
"rollbackTo": {
"description": "The config this deployment is rolling back to. Will be cleared after rollback is done.",
"description": "DEPRECATED. The config this deployment is rolling back to. Will be cleared after rollback is done.",
"$ref": "#/definitions/io.k8s.api.extensions.v1beta1.RollbackConfig"
},
"selector": {
@ -59500,6 +59376,7 @@
}
},
"io.k8s.api.extensions.v1beta1.RollbackConfig": {
"description": "DEPRECATED.",
"properties": {
"revision": {
"description": "The revision to rollback to. If set to 0, rollback to the last revision.",

View File

@ -3810,7 +3810,7 @@
},
"rollbackTo": {
"$ref": "v1beta1.RollbackConfig",
"description": "The config this deployment is rolling back to. Will be cleared after rollback is done."
"description": "DEPRECATED. The config this deployment is rolling back to. Will be cleared after rollback is done."
},
"progressDeadlineSeconds": {
"type": "integer",
@ -5854,6 +5854,7 @@
},
"v1beta1.RollbackConfig": {
"id": "v1beta1.RollbackConfig",
"description": "DEPRECATED.",
"properties": {
"revision": {
"type": "integer",
@ -5946,7 +5947,7 @@
},
"v1beta1.DeploymentRollback": {
"id": "v1beta1.DeploymentRollback",
"description": "DeploymentRollback stores the information required to rollback a deployment.",
"description": "DEPRECATED. DeploymentRollback stores the information required to rollback a deployment.",
"required": [
"name",
"rollbackTo"

View File

@ -1895,67 +1895,6 @@
}
]
},
{
"path": "/apis/apps/v1beta2/namespaces/{namespace}/deployments/{name}/rollback",
"description": "API at /apis/apps/v1beta2",
"operations": [
{
"type": "v1beta2.DeploymentRollback",
"method": "POST",
"summary": "create rollback of a Deployment",
"nickname": "createNamespacedDeploymentRollback",
"parameters": [
{
"type": "string",
"paramType": "query",
"name": "pretty",
"description": "If 'true', then the output is pretty printed.",
"required": false,
"allowMultiple": false
},
{
"type": "v1beta2.DeploymentRollback",
"paramType": "body",
"name": "body",
"description": "",
"required": true,
"allowMultiple": false
},
{
"type": "string",
"paramType": "path",
"name": "namespace",
"description": "object name and auth scope, such as for teams and projects",
"required": true,
"allowMultiple": false
},
{
"type": "string",
"paramType": "path",
"name": "name",
"description": "name of the DeploymentRollback",
"required": true,
"allowMultiple": false
}
],
"responseMessages": [
{
"code": 200,
"message": "OK",
"responseModel": "v1beta2.DeploymentRollback"
}
],
"produces": [
"application/json",
"application/yaml",
"application/vnd.kubernetes.protobuf"
],
"consumes": [
"*/*"
]
}
]
},
{
"path": "/apis/apps/v1beta2/namespaces/{namespace}/deployments/{name}/scale",
"description": "API at /apis/apps/v1beta2",
@ -7282,10 +7221,6 @@
"type": "boolean",
"description": "Indicates that the deployment is paused."
},
"rollbackTo": {
"$ref": "v1beta2.RollbackConfig",
"description": "The config this deployment is rolling back to. Will be cleared after rollback is done."
},
"progressDeadlineSeconds": {
"type": "integer",
"format": "int32",
@ -7321,17 +7256,6 @@
}
}
},
"v1beta2.RollbackConfig": {
"id": "v1beta2.RollbackConfig",
"description": "WIP: This is not ready to be used and we plan to make breaking changes to it.",
"properties": {
"revision": {
"type": "integer",
"format": "int64",
"description": "The revision to rollback to. If set to 0, rollback to the last revision."
}
}
},
"v1beta2.DeploymentStatus": {
"id": "v1beta2.DeploymentStatus",
"description": "WIP: This is not ready to be used and we plan to make breaking changes to it. DeploymentStatus is the most recently observed status of the Deployment.",
@ -7414,36 +7338,6 @@
}
}
},
"v1beta2.DeploymentRollback": {
"id": "v1beta2.DeploymentRollback",
"description": "WIP: This is not ready to be used and we plan to make breaking changes to it. DeploymentRollback stores the information required to rollback a deployment.",
"required": [
"name",
"rollbackTo"
],
"properties": {
"kind": {
"type": "string",
"description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds"
},
"apiVersion": {
"type": "string",
"description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources"
},
"name": {
"type": "string",
"description": "Required: This must match the Name of a deployment."
},
"updatedAnnotations": {
"type": "object",
"description": "The annotations to be updated to a deployment"
},
"rollbackTo": {
"$ref": "v1beta2.RollbackConfig",
"description": "The config of this deployment rollback."
}
}
},
"v1beta2.Scale": {
"id": "v1beta2.Scale",
"description": "WIP: This is not ready to be used and we plan to make breaking changes to it. Scale represents a scaling request for a resource.",

View File

@ -8759,7 +8759,7 @@
},
"rollbackTo": {
"$ref": "v1beta1.RollbackConfig",
"description": "The config this deployment is rolling back to. Will be cleared after rollback is done."
"description": "DEPRECATED. The config this deployment is rolling back to. Will be cleared after rollback is done."
},
"progressDeadlineSeconds": {
"type": "integer",
@ -8798,6 +8798,7 @@
},
"v1beta1.RollbackConfig": {
"id": "v1beta1.RollbackConfig",
"description": "DEPRECATED.",
"properties": {
"revision": {
"type": "integer",
@ -8890,7 +8891,7 @@
},
"v1beta1.DeploymentRollback": {
"id": "v1beta1.DeploymentRollback",
"description": "DeploymentRollback stores the information required to rollback a deployment.",
"description": "DEPRECATED. DeploymentRollback stores the information required to rollback a deployment.",
"required": [
"name",
"rollbackTo"

View File

@ -2463,6 +2463,9 @@ When an object is created, the system will populate this list with the current s
</div>
<div class="sect2">
<h3 id="_v1beta1_rollbackconfig">v1beta1.RollbackConfig</h3>
<div class="paragraph">
<p>DEPRECATED.</p>
</div>
<table class="tableblock frame-all grid-all" style="width:100%; ">
<colgroup>
<col style="width:20%;">
@ -3490,7 +3493,7 @@ The StatefulSet guarantees that a given network identity will always map to the
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">rollbackTo</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">The config this deployment is rolling back to. Will be cleared after rollback is done.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">DEPRECATED. The config this deployment is rolling back to. Will be cleared after rollback is done.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#_v1beta1_rollbackconfig">v1beta1.RollbackConfig</a></p></td>
<td class="tableblock halign-left valign-top"></td>
@ -4857,7 +4860,7 @@ Examples:<br>
<div class="sect2">
<h3 id="_v1beta1_deploymentrollback">v1beta1.DeploymentRollback</h3>
<div class="paragraph">
<p>DeploymentRollback stores the information required to rollback a deployment.</p>
<p>DEPRECATED. DeploymentRollback stores the information required to rollback a deployment.</p>
</div>
<table class="tableblock frame-all grid-all" style="width:100%; ">
<colgroup>

View File

@ -376,9 +376,6 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
<p><a href="#_v1beta2_deploymentlist">v1beta2.DeploymentList</a></p>
</li>
<li>
<p><a href="#_v1beta2_deploymentrollback">v1beta2.DeploymentRollback</a></p>
</li>
<li>
<p><a href="#_v1beta2_scale">v1beta2.Scale</a></p>
</li>
<li>
@ -2880,68 +2877,6 @@ When an object is created, the system will populate this list with the current s
</tbody>
</table>
</div>
<div class="sect2">
<h3 id="_v1beta2_deploymentrollback">v1beta2.DeploymentRollback</h3>
<div class="paragraph">
<p>WIP: This is not ready to be used and we plan to make breaking changes to it. DeploymentRollback stores the information required to rollback a deployment.</p>
</div>
<table class="tableblock frame-all grid-all" style="width:100%; ">
<colgroup>
<col style="width:20%;">
<col style="width:20%;">
<col style="width:20%;">
<col style="width:20%;">
<col style="width:20%;">
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">Name</th>
<th class="tableblock halign-left valign-top">Description</th>
<th class="tableblock halign-left valign-top">Required</th>
<th class="tableblock halign-left valign-top">Schema</th>
<th class="tableblock halign-left valign-top">Default</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">kind</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: <a href="https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds">https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds</a></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">apiVersion</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: <a href="https://git.k8s.io/community/contributors/devel/api-conventions.md#resources">https://git.k8s.io/community/contributors/devel/api-conventions.md#resources</a></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">name</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Required: This must match the Name of a deployment.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">true</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">updatedAnnotations</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">The annotations to be updated to a deployment</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">object</p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">rollbackTo</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">The config of this deployment rollback.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">true</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#_v1beta2_rollbackconfig">v1beta2.RollbackConfig</a></p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
</tbody>
</table>
</div>
<div class="sect2">
<h3 id="_v1beta2_daemonset">v1beta2.DaemonSet</h3>
@ -4877,40 +4812,6 @@ Examples:<br>
</tbody>
</table>
</div>
<div class="sect2">
<h3 id="_v1beta2_rollbackconfig">v1beta2.RollbackConfig</h3>
<div class="paragraph">
<p>WIP: This is not ready to be used and we plan to make breaking changes to it.</p>
</div>
<table class="tableblock frame-all grid-all" style="width:100%; ">
<colgroup>
<col style="width:20%;">
<col style="width:20%;">
<col style="width:20%;">
<col style="width:20%;">
<col style="width:20%;">
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">Name</th>
<th class="tableblock halign-left valign-top">Description</th>
<th class="tableblock halign-left valign-top">Required</th>
<th class="tableblock halign-left valign-top">Schema</th>
<th class="tableblock halign-left valign-top">Default</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">revision</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">The revision to rollback to. If set to 0, rollback to the last revision.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">integer (int64)</p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
</tbody>
</table>
</div>
<div class="sect2">
<h3 id="_v1beta2_replicaset">v1beta2.ReplicaSet</h3>
@ -5267,13 +5168,6 @@ Examples:<br>
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">rollbackTo</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">The config this deployment is rolling back to. Will be cleared after rollback is done.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#_v1beta2_rollbackconfig">v1beta2.RollbackConfig</a></p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">progressDeadlineSeconds</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">The maximum time in seconds for a deployment to make progress before it is considered to be failed. The deployment controller will continue to process failed deployments and a condition with a ProgressDeadlineExceeded reason will be surfaced in the deployment status. Once autoRollback is implemented, the deployment controller will automatically rollback failed deployments. Note that progress will not be estimated during the time a deployment is paused. Defaults to 600s.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
@ -7366,7 +7260,7 @@ Examples:<br>
</div>
<div id="footer">
<div id="footer-text">
Last updated 2017-08-08 01:49:22 UTC
</div>
</div>
</body>

File diff suppressed because it is too large Load Diff

View File

@ -3002,6 +3002,9 @@ When an object is created, the system will populate this list with the current s
</div>
<div class="sect2">
<h3 id="_v1beta1_rollbackconfig">v1beta1.RollbackConfig</h3>
<div class="paragraph">
<p>DEPRECATED.</p>
</div>
<table class="tableblock frame-all grid-all" style="width:100%; ">
<colgroup>
<col style="width:20%;">
@ -4139,7 +4142,7 @@ When an object is created, the system will populate this list with the current s
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">rollbackTo</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">The config this deployment is rolling back to. Will be cleared after rollback is done.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">DEPRECATED. The config this deployment is rolling back to. Will be cleared after rollback is done.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#_v1beta1_rollbackconfig">v1beta1.RollbackConfig</a></p></td>
<td class="tableblock halign-left valign-top"></td>
@ -5582,7 +5585,7 @@ Examples:<br>
<div class="sect2">
<h3 id="_v1beta1_deploymentrollback">v1beta1.DeploymentRollback</h3>
<div class="paragraph">
<p>DeploymentRollback stores the information required to rollback a deployment.</p>
<p>DEPRECATED. DeploymentRollback stores the information required to rollback a deployment.</p>
</div>
<table class="tableblock frame-all grid-all" style="width:100%; ">
<colgroup>

View File

@ -12418,7 +12418,7 @@
]
},
"io.k8s.api.extensions.v1beta1.DeploymentRollback": {
"description": "DeploymentRollback stores the information required to rollback a deployment.",
"description": "DEPRECATED. DeploymentRollback stores the information required to rollback a deployment.",
"required": [
"name",
"rollbackTo"
@ -12487,7 +12487,7 @@
"format": "int32"
},
"rollbackTo": {
"description": "The config this deployment is rolling back to. Will be cleared after rollback is done.",
"description": "DEPRECATED. The config this deployment is rolling back to. Will be cleared after rollback is done.",
"$ref": "#/definitions/io.k8s.api.extensions.v1beta1.RollbackConfig"
},
"selector": {
@ -12901,6 +12901,7 @@
}
},
"io.k8s.api.extensions.v1beta1.RollbackConfig": {
"description": "DEPRECATED.",
"properties": {
"revision": {
"description": "The revision to rollback to. If set to 0, rollback to the last revision.",

View File

@ -7118,7 +7118,7 @@
},
"rollbackTo": {
"$ref": "v1beta1.RollbackConfig",
"description": "The config this deployment is rolling back to. Will be cleared after rollback is done."
"description": "DEPRECATED. The config this deployment is rolling back to. Will be cleared after rollback is done."
},
"progressDeadlineSeconds": {
"type": "integer",
@ -7157,6 +7157,7 @@
},
"v1beta1.RollbackConfig": {
"id": "v1beta1.RollbackConfig",
"description": "DEPRECATED.",
"properties": {
"revision": {
"type": "integer",
@ -7249,7 +7250,7 @@
},
"v1beta1.DeploymentRollback": {
"id": "v1beta1.DeploymentRollback",
"description": "DeploymentRollback stores the information required to rollback a deployment.",
"description": "DEPRECATED. DeploymentRollback stores the information required to rollback a deployment.",
"required": [
"name",
"rollbackTo"

View File

@ -2757,6 +2757,9 @@ When an object is created, the system will populate this list with the current s
</div>
<div class="sect2">
<h3 id="_v1beta1_rollbackconfig">v1beta1.RollbackConfig</h3>
<div class="paragraph">
<p>DEPRECATED.</p>
</div>
<table class="tableblock frame-all grid-all" style="width:100%; ">
<colgroup>
<col style="width:20%;">
@ -3853,7 +3856,7 @@ When an object is created, the system will populate this list with the current s
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">rollbackTo</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">The config this deployment is rolling back to. Will be cleared after rollback is done.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">DEPRECATED. The config this deployment is rolling back to. Will be cleared after rollback is done.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#_v1beta1_rollbackconfig">v1beta1.RollbackConfig</a></p></td>
<td class="tableblock halign-left valign-top"></td>
@ -5144,7 +5147,7 @@ Examples:<br>
<div class="sect2">
<h3 id="_v1beta1_deploymentrollback">v1beta1.DeploymentRollback</h3>
<div class="paragraph">
<p>DeploymentRollback stores the information required to rollback a deployment.</p>
<p>DEPRECATED. DeploymentRollback stores the information required to rollback a deployment.</p>
</div>
<table class="tableblock frame-all grid-all" style="width:100%; ">
<colgroup>

View File

@ -18,6 +18,7 @@ package v1beta2
import (
"fmt"
"strconv"
appsv1beta2 "k8s.io/api/apps/v1beta2"
"k8s.io/api/core/v1"
@ -45,6 +46,8 @@ func addConversionFuncs(scheme *runtime.Scheme) error {
Convert_v1beta2_RollingUpdateDaemonSet_To_extensions_RollingUpdateDaemonSet,
Convert_v1beta2_StatefulSetStatus_To_apps_StatefulSetStatus,
Convert_apps_StatefulSetStatus_To_v1beta2_StatefulSetStatus,
Convert_v1beta2_Deployment_To_extensions_Deployment,
Convert_extensions_Deployment_To_v1beta2_Deployment,
// extensions
// TODO: below conversions should be dropped in favor of auto-generated
// ones, see https://github.com/kubernetes/kubernetes/issues/39865
@ -310,12 +313,6 @@ func Convert_v1beta2_DeploymentSpec_To_extensions_DeploymentSpec(in *appsv1beta2
out.RevisionHistoryLimit = in.RevisionHistoryLimit
out.MinReadySeconds = in.MinReadySeconds
out.Paused = in.Paused
if in.RollbackTo != nil {
out.RollbackTo = new(extensions.RollbackConfig)
out.RollbackTo.Revision = in.RollbackTo.Revision
} else {
out.RollbackTo = nil
}
if in.ProgressDeadlineSeconds != nil {
out.ProgressDeadlineSeconds = new(int32)
*out.ProgressDeadlineSeconds = *in.ProgressDeadlineSeconds
@ -338,12 +335,6 @@ func Convert_extensions_DeploymentSpec_To_v1beta2_DeploymentSpec(in *extensions.
}
out.MinReadySeconds = int32(in.MinReadySeconds)
out.Paused = in.Paused
if in.RollbackTo != nil {
out.RollbackTo = new(appsv1beta2.RollbackConfig)
out.RollbackTo.Revision = int64(in.RollbackTo.Revision)
} else {
out.RollbackTo = nil
}
if in.ProgressDeadlineSeconds != nil {
out.ProgressDeadlineSeconds = new(int32)
*out.ProgressDeadlineSeconds = *in.ProgressDeadlineSeconds
@ -414,6 +405,32 @@ func Convert_extensions_ReplicaSetSpec_To_v1beta2_ReplicaSetSpec(in *extensions.
return nil
}
func Convert_v1beta2_Deployment_To_extensions_Deployment(in *appsv1beta2.Deployment, out *extensions.Deployment, s conversion.Scope) error {
out.ObjectMeta = in.ObjectMeta
if err := Convert_v1beta2_DeploymentSpec_To_extensions_DeploymentSpec(&in.Spec, &out.Spec, s); err != nil {
return err
}
// Copy annotation to deprecated rollbackTo field for roundtrip
// TODO: remove this conversion after we delete extensions/v1beta1 and apps/v1beta1 Deployment
if revision, _ := in.Annotations[appsv1beta2.DeprecatedRollbackTo]; revision != "" {
if revision64, err := strconv.ParseInt(revision, 10, 64); err != nil {
return fmt.Errorf("failed to parse annotation[%s]=%s as int64: %v", appsv1beta2.DeprecatedRollbackTo, revision, err)
} else {
out.Spec.RollbackTo = new(extensions.RollbackConfig)
out.Spec.RollbackTo.Revision = revision64
}
delete(out.Annotations, appsv1beta2.DeprecatedRollbackTo)
} else {
out.Spec.RollbackTo = nil
}
if err := Convert_v1beta2_DeploymentStatus_To_extensions_DeploymentStatus(&in.Status, &out.Status, s); err != nil {
return err
}
return nil
}
func Convert_v1beta2_ReplicaSetSpec_To_extensions_ReplicaSetSpec(in *appsv1beta2.ReplicaSetSpec, out *extensions.ReplicaSetSpec, s conversion.Scope) error {
if in.Replicas != nil {
out.Replicas = *in.Replicas
@ -425,3 +442,26 @@ func Convert_v1beta2_ReplicaSetSpec_To_extensions_ReplicaSetSpec(in *appsv1beta2
}
return nil
}
func Convert_extensions_Deployment_To_v1beta2_Deployment(in *extensions.Deployment, out *appsv1beta2.Deployment, s conversion.Scope) error {
out.ObjectMeta = in.ObjectMeta
if err := Convert_extensions_DeploymentSpec_To_v1beta2_DeploymentSpec(&in.Spec, &out.Spec, s); err != nil {
return err
}
// Copy deprecated rollbackTo field to annotation for roundtrip
// TODO: remove this conversion after we delete extensions/v1beta1 and apps/v1beta1 Deployment
if in.Spec.RollbackTo != nil {
if out.Annotations == nil {
out.Annotations = make(map[string]string)
}
out.Annotations[appsv1beta2.DeprecatedRollbackTo] = strconv.FormatInt(in.Spec.RollbackTo.Revision, 10)
} else {
delete(out.Annotations, appsv1beta2.DeprecatedRollbackTo)
}
if err := Convert_extensions_DeploymentStatus_To_v1beta2_DeploymentStatus(&in.Status, &out.Status, s); err != nil {
return err
}
return nil
}

View File

@ -57,8 +57,6 @@ func RegisterConversions(scheme *runtime.Scheme) error {
Convert_extensions_DeploymentCondition_To_v1beta2_DeploymentCondition,
Convert_v1beta2_DeploymentList_To_extensions_DeploymentList,
Convert_extensions_DeploymentList_To_v1beta2_DeploymentList,
Convert_v1beta2_DeploymentRollback_To_extensions_DeploymentRollback,
Convert_extensions_DeploymentRollback_To_v1beta2_DeploymentRollback,
Convert_v1beta2_DeploymentSpec_To_extensions_DeploymentSpec,
Convert_extensions_DeploymentSpec_To_v1beta2_DeploymentSpec,
Convert_v1beta2_DeploymentStatus_To_extensions_DeploymentStatus,
@ -75,8 +73,6 @@ func RegisterConversions(scheme *runtime.Scheme) error {
Convert_extensions_ReplicaSetSpec_To_v1beta2_ReplicaSetSpec,
Convert_v1beta2_ReplicaSetStatus_To_extensions_ReplicaSetStatus,
Convert_extensions_ReplicaSetStatus_To_v1beta2_ReplicaSetStatus,
Convert_v1beta2_RollbackConfig_To_extensions_RollbackConfig,
Convert_extensions_RollbackConfig_To_v1beta2_RollbackConfig,
Convert_v1beta2_RollingUpdateDaemonSet_To_extensions_RollingUpdateDaemonSet,
Convert_extensions_RollingUpdateDaemonSet_To_v1beta2_RollingUpdateDaemonSet,
Convert_v1beta2_RollingUpdateDeployment_To_extensions_RollingUpdateDeployment,
@ -299,11 +295,6 @@ func autoConvert_v1beta2_Deployment_To_extensions_Deployment(in *v1beta2.Deploym
return nil
}
// Convert_v1beta2_Deployment_To_extensions_Deployment is an autogenerated conversion function.
func Convert_v1beta2_Deployment_To_extensions_Deployment(in *v1beta2.Deployment, out *extensions.Deployment, s conversion.Scope) error {
return autoConvert_v1beta2_Deployment_To_extensions_Deployment(in, out, s)
}
func autoConvert_extensions_Deployment_To_v1beta2_Deployment(in *extensions.Deployment, out *v1beta2.Deployment, s conversion.Scope) error {
out.ObjectMeta = in.ObjectMeta
if err := Convert_extensions_DeploymentSpec_To_v1beta2_DeploymentSpec(&in.Spec, &out.Spec, s); err != nil {
@ -315,11 +306,6 @@ func autoConvert_extensions_Deployment_To_v1beta2_Deployment(in *extensions.Depl
return nil
}
// Convert_extensions_Deployment_To_v1beta2_Deployment is an autogenerated conversion function.
func Convert_extensions_Deployment_To_v1beta2_Deployment(in *extensions.Deployment, out *v1beta2.Deployment, s conversion.Scope) error {
return autoConvert_extensions_Deployment_To_v1beta2_Deployment(in, out, s)
}
func autoConvert_v1beta2_DeploymentCondition_To_extensions_DeploymentCondition(in *v1beta2.DeploymentCondition, out *extensions.DeploymentCondition, s conversion.Scope) error {
out.Type = extensions.DeploymentConditionType(in.Type)
out.Status = api.ConditionStatus(in.Status)
@ -392,34 +378,6 @@ func Convert_extensions_DeploymentList_To_v1beta2_DeploymentList(in *extensions.
return autoConvert_extensions_DeploymentList_To_v1beta2_DeploymentList(in, out, s)
}
func autoConvert_v1beta2_DeploymentRollback_To_extensions_DeploymentRollback(in *v1beta2.DeploymentRollback, out *extensions.DeploymentRollback, s conversion.Scope) error {
out.Name = in.Name
out.UpdatedAnnotations = *(*map[string]string)(unsafe.Pointer(&in.UpdatedAnnotations))
if err := Convert_v1beta2_RollbackConfig_To_extensions_RollbackConfig(&in.RollbackTo, &out.RollbackTo, s); err != nil {
return err
}
return nil
}
// Convert_v1beta2_DeploymentRollback_To_extensions_DeploymentRollback is an autogenerated conversion function.
func Convert_v1beta2_DeploymentRollback_To_extensions_DeploymentRollback(in *v1beta2.DeploymentRollback, out *extensions.DeploymentRollback, s conversion.Scope) error {
return autoConvert_v1beta2_DeploymentRollback_To_extensions_DeploymentRollback(in, out, s)
}
func autoConvert_extensions_DeploymentRollback_To_v1beta2_DeploymentRollback(in *extensions.DeploymentRollback, out *v1beta2.DeploymentRollback, s conversion.Scope) error {
out.Name = in.Name
out.UpdatedAnnotations = *(*map[string]string)(unsafe.Pointer(&in.UpdatedAnnotations))
if err := Convert_extensions_RollbackConfig_To_v1beta2_RollbackConfig(&in.RollbackTo, &out.RollbackTo, s); err != nil {
return err
}
return nil
}
// Convert_extensions_DeploymentRollback_To_v1beta2_DeploymentRollback is an autogenerated conversion function.
func Convert_extensions_DeploymentRollback_To_v1beta2_DeploymentRollback(in *extensions.DeploymentRollback, out *v1beta2.DeploymentRollback, s conversion.Scope) error {
return autoConvert_extensions_DeploymentRollback_To_v1beta2_DeploymentRollback(in, out, s)
}
func autoConvert_v1beta2_DeploymentSpec_To_extensions_DeploymentSpec(in *v1beta2.DeploymentSpec, out *extensions.DeploymentSpec, s conversion.Scope) error {
if err := v1.Convert_Pointer_int32_To_int32(&in.Replicas, &out.Replicas, s); err != nil {
return err
@ -434,7 +392,6 @@ func autoConvert_v1beta2_DeploymentSpec_To_extensions_DeploymentSpec(in *v1beta2
out.MinReadySeconds = in.MinReadySeconds
out.RevisionHistoryLimit = (*int32)(unsafe.Pointer(in.RevisionHistoryLimit))
out.Paused = in.Paused
out.RollbackTo = (*extensions.RollbackConfig)(unsafe.Pointer(in.RollbackTo))
out.ProgressDeadlineSeconds = (*int32)(unsafe.Pointer(in.ProgressDeadlineSeconds))
return nil
}
@ -453,7 +410,7 @@ func autoConvert_extensions_DeploymentSpec_To_v1beta2_DeploymentSpec(in *extensi
out.MinReadySeconds = in.MinReadySeconds
out.RevisionHistoryLimit = (*int32)(unsafe.Pointer(in.RevisionHistoryLimit))
out.Paused = in.Paused
out.RollbackTo = (*v1beta2.RollbackConfig)(unsafe.Pointer(in.RollbackTo))
// WARNING: in.RollbackTo requires manual conversion: does not exist in peer-type
out.ProgressDeadlineSeconds = (*int32)(unsafe.Pointer(in.ProgressDeadlineSeconds))
return nil
}
@ -676,26 +633,6 @@ func Convert_extensions_ReplicaSetStatus_To_v1beta2_ReplicaSetStatus(in *extensi
return autoConvert_extensions_ReplicaSetStatus_To_v1beta2_ReplicaSetStatus(in, out, s)
}
func autoConvert_v1beta2_RollbackConfig_To_extensions_RollbackConfig(in *v1beta2.RollbackConfig, out *extensions.RollbackConfig, s conversion.Scope) error {
out.Revision = in.Revision
return nil
}
// Convert_v1beta2_RollbackConfig_To_extensions_RollbackConfig is an autogenerated conversion function.
func Convert_v1beta2_RollbackConfig_To_extensions_RollbackConfig(in *v1beta2.RollbackConfig, out *extensions.RollbackConfig, s conversion.Scope) error {
return autoConvert_v1beta2_RollbackConfig_To_extensions_RollbackConfig(in, out, s)
}
func autoConvert_extensions_RollbackConfig_To_v1beta2_RollbackConfig(in *extensions.RollbackConfig, out *v1beta2.RollbackConfig, s conversion.Scope) error {
out.Revision = in.Revision
return nil
}
// Convert_extensions_RollbackConfig_To_v1beta2_RollbackConfig is an autogenerated conversion function.
func Convert_extensions_RollbackConfig_To_v1beta2_RollbackConfig(in *extensions.RollbackConfig, out *v1beta2.RollbackConfig, s conversion.Scope) error {
return autoConvert_extensions_RollbackConfig_To_v1beta2_RollbackConfig(in, out, s)
}
func autoConvert_v1beta2_RollingUpdateDaemonSet_To_extensions_RollingUpdateDaemonSet(in *v1beta2.RollingUpdateDaemonSet, out *extensions.RollingUpdateDaemonSet, s conversion.Scope) error {
// WARNING: in.MaxUnavailable requires manual conversion: inconvertible types (*k8s.io/apimachinery/pkg/util/intstr.IntOrString vs k8s.io/apimachinery/pkg/util/intstr.IntOrString)
return nil

View File

@ -216,6 +216,7 @@ type DeploymentSpec struct {
// +optional
Paused bool
// DEPRECATED.
// The config this deployment is rolling back to. Will be cleared after rollback is done.
// +optional
RollbackTo *RollbackConfig
@ -232,6 +233,7 @@ type DeploymentSpec struct {
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// DEPRECATED.
// DeploymentRollback stores the information required to rollback a deployment.
type DeploymentRollback struct {
metav1.TypeMeta
@ -244,6 +246,7 @@ type DeploymentRollback struct {
RollbackTo RollbackConfig
}
// DEPRECATED.
type RollbackConfig struct {
// The revision to rollback to. If set to 0, rollback to the last revision.
// +optional

View File

@ -83,7 +83,6 @@ func (p RESTStorageProvider) v1beta2Storage(apiResourceConfigSource serverstorag
deploymentStorage := deploymentstore.NewStorage(restOptionsGetter)
storage["deployments"] = deploymentStorage.Deployment
storage["deployments/status"] = deploymentStorage.Status
storage["deployments/rollback"] = deploymentStorage.Rollback
storage["deployments/scale"] = deploymentStorage.Scale
}
if apiResourceConfigSource.ResourceEnabled(version.WithResource("statefulsets")) {

View File

@ -109,6 +109,7 @@ message DeploymentList {
repeated Deployment items = 2;
}
// DEPRECATED.
// DeploymentRollback stores the information required to rollback a deployment.
message DeploymentRollback {
// Required: This must match the Name of a deployment.
@ -157,6 +158,7 @@ message DeploymentSpec {
// +optional
optional bool paused = 7;
// DEPRECATED.
// The config this deployment is rolling back to. Will be cleared after rollback is done.
// +optional
optional RollbackConfig rollbackTo = 8;
@ -224,6 +226,7 @@ message DeploymentStrategy {
optional RollingUpdateDeployment rollingUpdate = 2;
}
// DEPRECATED.
message RollbackConfig {
// The revision to rollback to. If set to 0, rollback to the last revision.
// +optional

View File

@ -305,6 +305,7 @@ type DeploymentSpec struct {
// +optional
Paused bool `json:"paused,omitempty" protobuf:"varint,7,opt,name=paused"`
// DEPRECATED.
// The config this deployment is rolling back to. Will be cleared after rollback is done.
// +optional
RollbackTo *RollbackConfig `json:"rollbackTo,omitempty" protobuf:"bytes,8,opt,name=rollbackTo"`
@ -321,6 +322,7 @@ type DeploymentSpec struct {
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// DEPRECATED.
// DeploymentRollback stores the information required to rollback a deployment.
type DeploymentRollback struct {
metav1.TypeMeta `json:",inline"`
@ -333,6 +335,7 @@ type DeploymentRollback struct {
RollbackTo RollbackConfig `json:"rollbackTo" protobuf:"bytes,3,opt,name=rollbackTo"`
}
// DEPRECATED.
type RollbackConfig struct {
// The revision to rollback to. If set to 0, rollback to the last revision.
// +optional

View File

@ -84,7 +84,7 @@ func (DeploymentList) SwaggerDoc() map[string]string {
}
var map_DeploymentRollback = map[string]string{
"": "DeploymentRollback stores the information required to rollback a deployment.",
"": "DEPRECATED. DeploymentRollback stores the information required to rollback a deployment.",
"name": "Required: This must match the Name of a deployment.",
"updatedAnnotations": "The annotations to be updated to a deployment",
"rollbackTo": "The config of this deployment rollback.",
@ -103,7 +103,7 @@ var map_DeploymentSpec = map[string]string{
"minReadySeconds": "Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready)",
"revisionHistoryLimit": "The number of old ReplicaSets to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified. Defaults to 2.",
"paused": "Indicates that the deployment is paused.",
"rollbackTo": "The config this deployment is rolling back to. Will be cleared after rollback is done.",
"rollbackTo": "DEPRECATED. The config this deployment is rolling back to. Will be cleared after rollback is done.",
"progressDeadlineSeconds": "The maximum time in seconds for a deployment to make progress before it is considered to be failed. The deployment controller will continue to process failed deployments and a condition with a ProgressDeadlineExceeded reason will be surfaced in the deployment status. Once autoRollback is implemented, the deployment controller will automatically rollback failed deployments. Note that progress will not be estimated during the time a deployment is paused. Defaults to 600s.",
}
@ -138,6 +138,7 @@ func (DeploymentStrategy) SwaggerDoc() map[string]string {
}
var map_RollbackConfig = map[string]string{
"": "DEPRECATED.",
"revision": "The revision to rollback to. If set to 0, rollback to the last revision.",
}

File diff suppressed because it is too large Load Diff

View File

@ -220,20 +220,6 @@ message DeploymentList {
repeated Deployment items = 2;
}
// WIP: This is not ready to be used and we plan to make breaking changes to it.
// DeploymentRollback stores the information required to rollback a deployment.
message DeploymentRollback {
// Required: This must match the Name of a deployment.
optional string name = 1;
// The annotations to be updated to a deployment
// +optional
map<string, string> updatedAnnotations = 2;
// The config of this deployment rollback.
optional RollbackConfig rollbackTo = 3;
}
// WIP: This is not ready to be used and we plan to make breaking changes to it.
// DeploymentSpec is the specification of the desired behavior of the Deployment.
message DeploymentSpec {
@ -270,10 +256,6 @@ message DeploymentSpec {
// +optional
optional bool paused = 7;
// The config this deployment is rolling back to. Will be cleared after rollback is done.
// +optional
optional RollbackConfig rollbackTo = 8;
// The maximum time in seconds for a deployment to make progress before it
// is considered to be failed. The deployment controller will continue to
// process failed deployments and a condition with a ProgressDeadlineExceeded
@ -457,13 +439,6 @@ message ReplicaSetStatus {
repeated ReplicaSetCondition conditions = 6;
}
// WIP: This is not ready to be used and we plan to make breaking changes to it.
message RollbackConfig {
// The revision to rollback to. If set to 0, rollback to the last revision.
// +optional
optional int64 revision = 1;
}
// WIP: This is not ready to be used and we plan to make breaking changes to it.
// Spec to control the desired behavior of daemon set rolling update.
message RollingUpdateDaemonSet {

View File

@ -46,7 +46,6 @@ func addKnownTypes(scheme *runtime.Scheme) error {
scheme.AddKnownTypes(SchemeGroupVersion,
&Deployment{},
&DeploymentList{},
&DeploymentRollback{},
&Scale{},
&StatefulSet{},
&StatefulSetList{},

View File

@ -25,6 +25,7 @@ import (
const (
ControllerRevisionHashLabelKey = "controller-revision-hash"
StatefulSetRevisionLabel = ControllerRevisionHashLabelKey
DeprecatedRollbackTo = "deprecated.deployment.rollback.to"
)
// WIP: This is not ready to be used and we plan to make breaking changes to it.
@ -315,10 +316,6 @@ type DeploymentSpec struct {
// +optional
Paused bool `json:"paused,omitempty" protobuf:"varint,7,opt,name=paused"`
// The config this deployment is rolling back to. Will be cleared after rollback is done.
// +optional
RollbackTo *RollbackConfig `json:"rollbackTo,omitempty" protobuf:"bytes,8,opt,name=rollbackTo"`
// The maximum time in seconds for a deployment to make progress before it
// is considered to be failed. The deployment controller will continue to
// process failed deployments and a condition with a ProgressDeadlineExceeded
@ -329,28 +326,6 @@ type DeploymentSpec struct {
ProgressDeadlineSeconds *int32 `json:"progressDeadlineSeconds,omitempty" protobuf:"varint,9,opt,name=progressDeadlineSeconds"`
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// WIP: This is not ready to be used and we plan to make breaking changes to it.
// DeploymentRollback stores the information required to rollback a deployment.
type DeploymentRollback struct {
metav1.TypeMeta `json:",inline"`
// Required: This must match the Name of a deployment.
Name string `json:"name" protobuf:"bytes,1,opt,name=name"`
// The annotations to be updated to a deployment
// +optional
UpdatedAnnotations map[string]string `json:"updatedAnnotations,omitempty" protobuf:"bytes,2,rep,name=updatedAnnotations"`
// The config of this deployment rollback.
RollbackTo RollbackConfig `json:"rollbackTo" protobuf:"bytes,3,opt,name=rollbackTo"`
}
// WIP: This is not ready to be used and we plan to make breaking changes to it.
type RollbackConfig struct {
// The revision to rollback to. If set to 0, rollback to the last revision.
// +optional
Revision int64 `json:"revision,omitempty" protobuf:"varint,1,opt,name=revision"`
}
const (
// DefaultDeploymentUniqueLabelKey is the default key of the selector that is added
// to existing RCs (and label key that is added to its pods) to prevent the existing RCs

View File

@ -124,17 +124,6 @@ func (DeploymentList) SwaggerDoc() map[string]string {
return map_DeploymentList
}
var map_DeploymentRollback = map[string]string{
"": "WIP: This is not ready to be used and we plan to make breaking changes to it. DeploymentRollback stores the information required to rollback a deployment.",
"name": "Required: This must match the Name of a deployment.",
"updatedAnnotations": "The annotations to be updated to a deployment",
"rollbackTo": "The config of this deployment rollback.",
}
func (DeploymentRollback) SwaggerDoc() map[string]string {
return map_DeploymentRollback
}
var map_DeploymentSpec = map[string]string{
"": "WIP: This is not ready to be used and we plan to make breaking changes to it. DeploymentSpec is the specification of the desired behavior of the Deployment.",
"replicas": "Number of desired pods. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1.",
@ -144,7 +133,6 @@ var map_DeploymentSpec = map[string]string{
"minReadySeconds": "Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready)",
"revisionHistoryLimit": "The number of old ReplicaSets to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified. Defaults to 10.",
"paused": "Indicates that the deployment is paused.",
"rollbackTo": "The config this deployment is rolling back to. Will be cleared after rollback is done.",
"progressDeadlineSeconds": "The maximum time in seconds for a deployment to make progress before it is considered to be failed. The deployment controller will continue to process failed deployments and a condition with a ProgressDeadlineExceeded reason will be surfaced in the deployment status. Once autoRollback is implemented, the deployment controller will automatically rollback failed deployments. Note that progress will not be estimated during the time a deployment is paused. Defaults to 600s.",
}
@ -238,15 +226,6 @@ func (ReplicaSetStatus) SwaggerDoc() map[string]string {
return map_ReplicaSetStatus
}
var map_RollbackConfig = map[string]string{
"": "WIP: This is not ready to be used and we plan to make breaking changes to it.",
"revision": "The revision to rollback to. If set to 0, rollback to the last revision.",
}
func (RollbackConfig) SwaggerDoc() map[string]string {
return map_RollbackConfig
}
var map_RollingUpdateDaemonSet = map[string]string{
"": "WIP: This is not ready to be used and we plan to make breaking changes to it. Spec to control the desired behavior of daemon set rolling update.",
"maxUnavailable": "The maximum number of DaemonSet pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of total number of DaemonSet pods at the start of the update (ex: 10%). Absolute number is calculated from percentage by rounding up. This cannot be 0. Default value is 1. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their pods stopped for an update at any given time. The update starts by stopping at most 30% of those DaemonSet pods and then brings up new DaemonSet pods in their place. Once the new pods are available, it then proceeds onto other DaemonSet pods, thus ensuring that at least 70% of original number of DaemonSet pods are available at all times during the update.",

View File

@ -71,10 +71,6 @@ func RegisterDeepCopies(scheme *runtime.Scheme) error {
in.(*DeploymentList).DeepCopyInto(out.(*DeploymentList))
return nil
}, InType: reflect.TypeOf(&DeploymentList{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*DeploymentRollback).DeepCopyInto(out.(*DeploymentRollback))
return nil
}, InType: reflect.TypeOf(&DeploymentRollback{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*DeploymentSpec).DeepCopyInto(out.(*DeploymentSpec))
return nil
@ -107,10 +103,6 @@ func RegisterDeepCopies(scheme *runtime.Scheme) error {
in.(*ReplicaSetStatus).DeepCopyInto(out.(*ReplicaSetStatus))
return nil
}, InType: reflect.TypeOf(&ReplicaSetStatus{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*RollbackConfig).DeepCopyInto(out.(*RollbackConfig))
return nil
}, InType: reflect.TypeOf(&RollbackConfig{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*RollingUpdateDaemonSet).DeepCopyInto(out.(*RollingUpdateDaemonSet))
return nil
@ -388,40 +380,6 @@ func (in *DeploymentList) DeepCopyObject() runtime.Object {
}
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *DeploymentRollback) DeepCopyInto(out *DeploymentRollback) {
*out = *in
out.TypeMeta = in.TypeMeta
if in.UpdatedAnnotations != nil {
in, out := &in.UpdatedAnnotations, &out.UpdatedAnnotations
*out = make(map[string]string, len(*in))
for key, val := range *in {
(*out)[key] = val
}
}
out.RollbackTo = in.RollbackTo
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeploymentRollback.
func (in *DeploymentRollback) DeepCopy() *DeploymentRollback {
if in == nil {
return nil
}
out := new(DeploymentRollback)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *DeploymentRollback) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
} else {
return nil
}
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *DeploymentSpec) DeepCopyInto(out *DeploymentSpec) {
*out = *in
@ -454,15 +412,6 @@ func (in *DeploymentSpec) DeepCopyInto(out *DeploymentSpec) {
**out = **in
}
}
if in.RollbackTo != nil {
in, out := &in.RollbackTo, &out.RollbackTo
if *in == nil {
*out = nil
} else {
*out = new(RollbackConfig)
**out = **in
}
}
if in.ProgressDeadlineSeconds != nil {
in, out := &in.ProgressDeadlineSeconds, &out.ProgressDeadlineSeconds
if *in == nil {
@ -680,22 +629,6 @@ func (in *ReplicaSetStatus) DeepCopy() *ReplicaSetStatus {
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *RollbackConfig) DeepCopyInto(out *RollbackConfig) {
*out = *in
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RollbackConfig.
func (in *RollbackConfig) DeepCopy() *RollbackConfig {
if in == nil {
return nil
}
out := new(RollbackConfig)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *RollingUpdateDaemonSet) DeepCopyInto(out *RollingUpdateDaemonSet) {
*out = *in

View File

@ -245,6 +245,7 @@ message DeploymentList {
repeated Deployment items = 2;
}
// DEPRECATED.
// DeploymentRollback stores the information required to rollback a deployment.
message DeploymentRollback {
// Required: This must match the Name of a deployment.
@ -293,6 +294,7 @@ message DeploymentSpec {
// +optional
optional bool paused = 7;
// DEPRECATED.
// The config this deployment is rolling back to. Will be cleared after rollback is done.
// +optional
optional RollbackConfig rollbackTo = 8;
@ -852,6 +854,7 @@ message ReplicaSetStatus {
message ReplicationControllerDummy {
}
// DEPRECATED.
message RollbackConfig {
// The revision to rollback to. If set to 0, rollback to the last revision.
// +optional

View File

@ -211,6 +211,7 @@ type DeploymentSpec struct {
// +optional
Paused bool `json:"paused,omitempty" protobuf:"varint,7,opt,name=paused"`
// DEPRECATED.
// The config this deployment is rolling back to. Will be cleared after rollback is done.
// +optional
RollbackTo *RollbackConfig `json:"rollbackTo,omitempty" protobuf:"bytes,8,opt,name=rollbackTo"`
@ -227,6 +228,7 @@ type DeploymentSpec struct {
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// DEPRECATED.
// DeploymentRollback stores the information required to rollback a deployment.
type DeploymentRollback struct {
metav1.TypeMeta `json:",inline"`
@ -239,6 +241,7 @@ type DeploymentRollback struct {
RollbackTo RollbackConfig `json:"rollbackTo" protobuf:"bytes,3,opt,name=rollbackTo"`
}
// DEPRECATED.
type RollbackConfig struct {
// The revision to rollback to. If set to 0, rollback to the last revision.
// +optional

View File

@ -152,7 +152,7 @@ func (DeploymentList) SwaggerDoc() map[string]string {
}
var map_DeploymentRollback = map[string]string{
"": "DeploymentRollback stores the information required to rollback a deployment.",
"": "DEPRECATED. DeploymentRollback stores the information required to rollback a deployment.",
"name": "Required: This must match the Name of a deployment.",
"updatedAnnotations": "The annotations to be updated to a deployment",
"rollbackTo": "The config of this deployment rollback.",
@ -171,7 +171,7 @@ var map_DeploymentSpec = map[string]string{
"minReadySeconds": "Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready)",
"revisionHistoryLimit": "The number of old ReplicaSets to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified.",
"paused": "Indicates that the deployment is paused and will not be processed by the deployment controller.",
"rollbackTo": "The config this deployment is rolling back to. Will be cleared after rollback is done.",
"rollbackTo": "DEPRECATED. The config this deployment is rolling back to. Will be cleared after rollback is done.",
"progressDeadlineSeconds": "The maximum time in seconds for a deployment to make progress before it is considered to be failed. The deployment controller will continue to process failed deployments and a condition with a ProgressDeadlineExceeded reason will be surfaced in the deployment status. Once autoRollback is implemented, the deployment controller will automatically rollback failed deployments. Note that progress will not be estimated during the time a deployment is paused. This is not set by default.",
}
@ -502,6 +502,7 @@ func (ReplicationControllerDummy) SwaggerDoc() map[string]string {
}
var map_RollbackConfig = map[string]string{
"": "DEPRECATED.",
"revision": "The revision to rollback to. If set to 0, rollback to the last revision.",
}

View File

@ -385,8 +385,7 @@ var ephemeralWhiteList = createEphemeralWhiteList(
// --
// k8s.io/kubernetes/pkg/apis/apps/v1beta2
gvr("apps", "v1beta2", "scales"), // not stored in etcd, part of kapiv1.ReplicationController
gvr("apps", "v1beta2", "deploymentrollbacks"), // used to rollback deployment, not stored in etcd
gvr("apps", "v1beta2", "scales"), // not stored in etcd, part of kapiv1.ReplicationController
// --
// k8s.io/kubernetes/pkg/apis/batch/v2alpha1