Skip to content

Commit

Permalink
Merge pull request #21754 from kargakis/use-generation-for-deployments
Browse files Browse the repository at this point in the history
Use generation for deployments
  • Loading branch information
dchen1107 committed Feb 24, 2016
2 parents c1bd13e + 6506d76 commit a8c0ac8
Show file tree
Hide file tree
Showing 21 changed files with 275 additions and 112 deletions.
2 changes: 1 addition & 1 deletion api/swagger-spec/autoscaling_v1.json
Original file line number Diff line number Diff line change
Expand Up @@ -951,7 +951,7 @@
"generation": {
"type": "integer",
"format": "int64",
"description": "A sequence number representing a specific generation of the desired state. Currently only implemented by replication controllers. Populated by the system. Read-only."
"description": "A sequence number representing a specific generation of the desired state. Populated by the system. Read-only."
},
"creationTimestamp": {
"type": "string",
Expand Down
2 changes: 1 addition & 1 deletion api/swagger-spec/batch_v1.json
Original file line number Diff line number Diff line change
Expand Up @@ -951,7 +951,7 @@
"generation": {
"type": "integer",
"format": "int64",
"description": "A sequence number representing a specific generation of the desired state. Currently only implemented by replication controllers. Populated by the system. Read-only."
"description": "A sequence number representing a specific generation of the desired state. Populated by the system. Read-only."
},
"creationTimestamp": {
"type": "string",
Expand Down
7 changes: 6 additions & 1 deletion api/swagger-spec/extensions_v1beta1.json
Original file line number Diff line number Diff line change
Expand Up @@ -5298,7 +5298,7 @@
"generation": {
"type": "integer",
"format": "int64",
"description": "A sequence number representing a specific generation of the desired state. Currently only implemented by replication controllers. Populated by the system. Read-only."
"description": "A sequence number representing a specific generation of the desired state. Populated by the system. Read-only."
},
"creationTimestamp": {
"type": "string",
Expand Down Expand Up @@ -6853,6 +6853,11 @@
"id": "v1beta1.DeploymentStatus",
"description": "DeploymentStatus is the most recently observed status of the Deployment.",
"properties": {
"observedGeneration": {
"type": "integer",
"format": "int64",
"description": "The generation observed by the deployment controller."
},
"replicas": {
"type": "integer",
"format": "int32",
Expand Down
2 changes: 1 addition & 1 deletion api/swagger-spec/v1.json
Original file line number Diff line number Diff line change
Expand Up @@ -14633,7 +14633,7 @@
"generation": {
"type": "integer",
"format": "int64",
"description": "A sequence number representing a specific generation of the desired state. Currently only implemented by replication controllers. Populated by the system. Read-only."
"description": "A sequence number representing a specific generation of the desired state. Populated by the system. Read-only."
},
"creationTimestamp": {
"type": "string",
Expand Down
11 changes: 9 additions & 2 deletions docs/api-reference/extensions/v1beta1/definitions.html
Original file line number Diff line number Diff line change
Expand Up @@ -442,6 +442,13 @@ <h3 id="_v1beta1_deploymentstatus">v1beta1.DeploymentStatus</h3>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">observedGeneration</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">The generation observed by the deployment controller.</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>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">replicas</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Total number of non-terminated pods targeted by this deployment (their labels match the selector).</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
Expand Down Expand Up @@ -2486,7 +2493,7 @@ <h3 id="_v1_objectmeta">v1.ObjectMeta</h3>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">generation</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">A sequence number representing a specific generation of the desired state. Currently only implemented by replication controllers. Populated by the system. Read-only.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">A sequence number representing a specific generation of the desired state. Populated by the system. Read-only.</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>
Expand Down Expand Up @@ -5577,7 +5584,7 @@ <h3 id="_any">any</h3>
</div>
<div id="footer">
<div id="footer-text">
Last updated 2016-02-18 07:15:38 UTC
Last updated 2016-02-23 18:41:56 UTC
</div>
</div>
</body>
Expand Down
4 changes: 2 additions & 2 deletions docs/api-reference/v1/definitions.html
Original file line number Diff line number Diff line change
Expand Up @@ -1854,7 +1854,7 @@ <h3 id="_v1_objectmeta">v1.ObjectMeta</h3>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">generation</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">A sequence number representing a specific generation of the desired state. Currently only implemented by replication controllers. Populated by the system. Read-only.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">A sequence number representing a specific generation of the desired state. Populated by the system. Read-only.</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>
Expand Down Expand Up @@ -7477,7 +7477,7 @@ <h3 id="_any">any</h3>
</div>
<div id="footer">
<div id="footer-text">
Last updated 2016-02-16 23:43:33 UTC
Last updated 2016-02-23 18:41:48 UTC
</div>
</div>
</body>
Expand Down
2 changes: 1 addition & 1 deletion pkg/api/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ type ObjectMeta struct {
ResourceVersion string `json:"resourceVersion,omitempty"`

// A sequence number representing a specific generation of the desired state.
// Currently only implemented by replication controllers.
// Populated by the system. Read-only.
Generation int64 `json:"generation,omitempty"`

// CreationTimestamp is a timestamp representing the server time when this object was
Expand Down
4 changes: 1 addition & 3 deletions pkg/api/v1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,7 @@ type ObjectMeta struct {
ResourceVersion string `json:"resourceVersion,omitempty"`

// A sequence number representing a specific generation of the desired state.
// Currently only implemented by replication controllers.
// Populated by the system.
// Read-only.
// Populated by the system. Read-only.
Generation int64 `json:"generation,omitempty"`

// CreationTimestamp is a timestamp representing the server time when this object was
Expand Down
2 changes: 1 addition & 1 deletion pkg/api/v1/types_swagger_doc_generated.go
Original file line number Diff line number Diff line change
Expand Up @@ -913,7 +913,7 @@ var map_ObjectMeta = map[string]string{
"selfLink": "SelfLink is a URL representing this object. Populated by the system. Read-only.",
"uid": "UID is the unique in time and space value for this object. It is typically generated by the server on successful creation of a resource and is not allowed to change on PUT operations.\n\nPopulated by the system. Read-only. More info: http://releases.k8s.io/HEAD/docs/user-guide/identifiers.md#uids",
"resourceVersion": "An opaque value that represents the internal version of this object that can be used by clients to determine when objects have changed. May be used for optimistic concurrency, change detection, and the watch operation on a resource or set of resources. Clients must treat these values as opaque and passed unmodified back to the server. They may only be valid for a particular resource or set of resources.\n\nPopulated by the system. Read-only. Value must be treated as opaque by clients and . More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#concurrency-control-and-consistency",
"generation": "A sequence number representing a specific generation of the desired state. Currently only implemented by replication controllers. Populated by the system. Read-only.",
"generation": "A sequence number representing a specific generation of the desired state. Populated by the system. Read-only.",
"creationTimestamp": "CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC.\n\nPopulated by the system. Read-only. Null for lists. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata",
"deletionTimestamp": "DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This field is set by the server when a graceful deletion is requested by the user, and is not directly settable by a client. The resource will be deleted (no longer visible from resource lists, and not reachable by name) after the time in this field. Once set, this value may not be unset or be set further into the future, although it may be shortened or the resource may be deleted prior to this time. For example, a user may request that a pod is deleted in 30 seconds. The Kubelet will react by sending a graceful termination signal to the containers in the pod. Once the resource is deleted in the API, the Kubelet will send a hard termination signal to the container. If not set, graceful deletion of the object has not been requested.\n\nPopulated by the system when a graceful deletion is requested. Read-only. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata",
"deletionGracePeriodSeconds": "Number of seconds allowed for this object to gracefully terminate before it will be removed from the system. Only set when deletionTimestamp is also set. May only be shortened. Read-only.",
Expand Down
Loading

0 comments on commit a8c0ac8

Please sign in to comment.