From c4da91d7c59c0158196c4af3a10866bd7708d453 Mon Sep 17 00:00:00 2001 From: Yinan Li Date: Wed, 29 Nov 2017 13:54:20 -0800 Subject: [PATCH 1/2] Updated Deployment concept docs --- docs/concepts/workloads/controllers/deployment.md | 6 +++--- docs/concepts/workloads/controllers/nginx-deployment.yaml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/concepts/workloads/controllers/deployment.md b/docs/concepts/workloads/controllers/deployment.md index b57175ef95dbd..0b216b998188b 100644 --- a/docs/concepts/workloads/controllers/deployment.md +++ b/docs/concepts/workloads/controllers/deployment.md @@ -296,7 +296,7 @@ It is generally discouraged to make label selector updates and it is suggested t In any case, if you need to perform a label selector update, exercise great caution and make sure you have grasped all of the implications. -**Note:** In API version `apps/v1beta2`, a Deployment's label selector is immutable after it gets created. +**Note:** In API version `apps/v1`, a Deployment's label selector is immutable after it gets created. {: .note} * Selector additions require the pod template labels in the Deployment spec to be updated with the new label too, @@ -863,7 +863,7 @@ for the Pods targeted by this deployment. `.spec.selector` must match `.spec.template.metadata.labels`, or it will be rejected by the API. -In API version `apps/v1beta2`, `.spec.selector` and `.metadata.labels` no longer default to `.spec.template.metadata.labels` if not set. So they must be set explicitly. Also note that `.spec.selector` is immutable after creation of the Deployment in `apps/v1beta2`. +In API version `apps/v1`, `.spec.selector` and `.metadata.labels` do not default to `.spec.template.metadata.labels` if not set. So they must be set explicitly. Also note that `.spec.selector` is immutable after creation of the Deployment in `apps/v1`. A Deployment may terminate Pods whose labels match the selector if their template is different from `.spec.template` or if the total number of such Pods exceeds `.spec.replicas`. It brings up new @@ -937,7 +937,7 @@ a Pod is considered ready, see [Container Probes](/docs/concepts/workloads/pods/ ### Rollback To -Field `.spec.rollbackTo` has been deprecated in API versions `extensions/v1beta1` and `apps/v1beta1`, and is no longer supported in API version `apps/v1beta2`. Instead, `kubectl rollout undo` as introduced in [Rolling Back to a Previous Revision](#rolling-back-to-a-previous-revision) should be used. +Field `.spec.rollbackTo` has been deprecated in API versions prior to `apps/v1beta2`, and is no longer supported in API versions starting `apps/v1beta2`. Instead, `kubectl rollout undo` as introduced in [Rolling Back to a Previous Revision](#rolling-back-to-a-previous-revision) should be used. ### Revision History Limit diff --git a/docs/concepts/workloads/controllers/nginx-deployment.yaml b/docs/concepts/workloads/controllers/nginx-deployment.yaml index c495e9cdcc808..914209612d84d 100644 --- a/docs/concepts/workloads/controllers/nginx-deployment.yaml +++ b/docs/concepts/workloads/controllers/nginx-deployment.yaml @@ -1,4 +1,4 @@ -apiVersion: apps/v1beta2 # for versions before 1.8.0 use apps/v1beta1 +apiVersion: apps/v1 # for versions before 1.9.0 use apps/v1beta2 kind: Deployment metadata: name: nginx-deployment From b0b2184e54696ed1e7462263aad813e65a23f1cb Mon Sep 17 00:00:00 2001 From: Yinan Li Date: Fri, 1 Dec 2017 09:28:43 -0800 Subject: [PATCH 2/2] Addressed comments --- docs/concepts/workloads/controllers/deployment.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/concepts/workloads/controllers/deployment.md b/docs/concepts/workloads/controllers/deployment.md index 0b216b998188b..1b4f3c43b3de9 100644 --- a/docs/concepts/workloads/controllers/deployment.md +++ b/docs/concepts/workloads/controllers/deployment.md @@ -937,7 +937,7 @@ a Pod is considered ready, see [Container Probes](/docs/concepts/workloads/pods/ ### Rollback To -Field `.spec.rollbackTo` has been deprecated in API versions prior to `apps/v1beta2`, and is no longer supported in API versions starting `apps/v1beta2`. Instead, `kubectl rollout undo` as introduced in [Rolling Back to a Previous Revision](#rolling-back-to-a-previous-revision) should be used. +Field `.spec.rollbackTo` has been deprecated in API versions `extensions/v1beta1` and `apps/v1beta1`, and is no longer supported in API versions starting `apps/v1beta2`. Instead, `kubectl rollout undo` as introduced in [Rolling Back to a Previous Revision](#rolling-back-to-a-previous-revision) should be used. ### Revision History Limit