From ed574f456fa01d67bd76a6c0ebd43046482821ef Mon Sep 17 00:00:00 2001 From: "Venkata, Krishna (kv988c)" Date: Fri, 10 May 2019 16:46:43 -0500 Subject: [PATCH] Switch from default values being populated for upgrade strategy for ceph components This PS uses HelmToolKit function to add upgrade strategy parameters to ceph Components Change-Id: I54e71d2a52bd639b3e93fc899c1bf2cd075b5396 --- ceph-client/templates/deployment-mds.yaml | 1 + ceph-client/templates/deployment-mgr.yaml | 2 +- ceph-client/values.yaml | 11 +++++++++++ ceph-mon/templates/daemonset-mon.yaml | 1 + ceph-mon/values.yaml | 8 ++++++++ ceph-osd/templates/daemonset-osd.yaml | 1 + ceph-osd/values.yaml | 8 ++++++++ .../templates/deployment-cephfs-provisioner.yaml | 3 +-- .../templates/deployment-rbd-provisioner.yaml | 3 +-- ceph-provisioners/values.yaml | 4 ++++ 10 files changed, 37 insertions(+), 5 deletions(-) diff --git a/ceph-client/templates/deployment-mds.yaml b/ceph-client/templates/deployment-mds.yaml index debc83aad..dd4ae8426 100644 --- a/ceph-client/templates/deployment-mds.yaml +++ b/ceph-client/templates/deployment-mds.yaml @@ -33,6 +33,7 @@ spec: selector: matchLabels: {{ tuple $envAll "ceph" "mds" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 6 }} +{{ tuple $envAll | include "helm-toolkit.snippets.kubernetes_upgrades_deployment" | indent 2 }} template: metadata: name: ceph-mds diff --git a/ceph-client/templates/deployment-mgr.yaml b/ceph-client/templates/deployment-mgr.yaml index f7e17c057..92810b913 100644 --- a/ceph-client/templates/deployment-mgr.yaml +++ b/ceph-client/templates/deployment-mgr.yaml @@ -34,7 +34,7 @@ spec: matchLabels: {{ tuple $envAll "ceph" "mgr" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 6 }} strategy: - type: Recreate + type: {{ .Values.pod.updateStrategy.mgr.type }} template: metadata: labels: diff --git a/ceph-client/values.yaml b/ceph-client/values.yaml index 6be76f8d7..ca28d014a 100644 --- a/ceph-client/values.yaml +++ b/ceph-client/values.yaml @@ -106,6 +106,17 @@ pod: replicas: mds: 2 mgr: 2 + lifecycle: + upgrades: + deployments: + pod_replacement_strategy: RollingUpdate + revision_history: 3 + rolling_update: + max_surge: 25% + max_unavailable: 25% + updateStrategy: + mgr: + type: Recreate affinity: anti: type: diff --git a/ceph-mon/templates/daemonset-mon.yaml b/ceph-mon/templates/daemonset-mon.yaml index a53117ad7..0bf3f487c 100644 --- a/ceph-mon/templates/daemonset-mon.yaml +++ b/ceph-mon/templates/daemonset-mon.yaml @@ -59,6 +59,7 @@ spec: selector: matchLabels: {{ tuple $envAll "ceph" "mon" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 6 }} +{{ tuple $envAll "mon" | include "helm-toolkit.snippets.kubernetes_upgrades_daemonset" | indent 2 }} template: metadata: labels: diff --git a/ceph-mon/values.yaml b/ceph-mon/values.yaml index 42dbff30b..00a36be03 100644 --- a/ceph-mon/values.yaml +++ b/ceph-mon/values.yaml @@ -83,6 +83,14 @@ pod: dns_policy: "ClusterFirstWithHostNet" replicas: mon_check: 1 + lifecycle: + upgrades: + daemonsets: + pod_replacement_strategy: RollingUpdate + mon: + enabled: true + min_ready_seconds: 0 + max_unavailable: 1 affinity: anti: type: diff --git a/ceph-osd/templates/daemonset-osd.yaml b/ceph-osd/templates/daemonset-osd.yaml index 88887b50c..617ca7fd9 100644 --- a/ceph-osd/templates/daemonset-osd.yaml +++ b/ceph-osd/templates/daemonset-osd.yaml @@ -34,6 +34,7 @@ spec: selector: matchLabels: {{ tuple $envAll "ceph" "osd" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 6 }} +{{ tuple $envAll "osd" | include "helm-toolkit.snippets.kubernetes_upgrades_daemonset" | indent 2 }} template: metadata: labels: diff --git a/ceph-osd/values.yaml b/ceph-osd/values.yaml index b617d9015..520c246e4 100644 --- a/ceph-osd/values.yaml +++ b/ceph-osd/values.yaml @@ -74,6 +74,14 @@ pod: allowPrivilegeEscalation: false readOnlyRootFilesystem: true dns_policy: "ClusterFirstWithHostNet" + lifecycle: + upgrades: + daemonsets: + pod_replacement_strategy: RollingUpdate + osd: + enabled: true + min_ready_seconds: 0 + max_unavailable: 1 affinity: anti: type: diff --git a/ceph-provisioners/templates/deployment-cephfs-provisioner.yaml b/ceph-provisioners/templates/deployment-cephfs-provisioner.yaml index 1566e1ad8..8021c501b 100644 --- a/ceph-provisioners/templates/deployment-cephfs-provisioner.yaml +++ b/ceph-provisioners/templates/deployment-cephfs-provisioner.yaml @@ -140,8 +140,7 @@ spec: selector: matchLabels: {{ tuple $envAll "cephfs" "provisioner" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 6 }} - strategy: - type: Recreate +{{ tuple $envAll | include "helm-toolkit.snippets.kubernetes_upgrades_deployment" | indent 2 }} template: metadata: labels: diff --git a/ceph-provisioners/templates/deployment-rbd-provisioner.yaml b/ceph-provisioners/templates/deployment-rbd-provisioner.yaml index f72769689..f74d9ba59 100644 --- a/ceph-provisioners/templates/deployment-rbd-provisioner.yaml +++ b/ceph-provisioners/templates/deployment-rbd-provisioner.yaml @@ -130,8 +130,7 @@ spec: selector: matchLabels: {{ tuple $envAll "rbd" "provisioner" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 6 }} - strategy: - type: Recreate +{{ tuple $envAll | include "helm-toolkit.snippets.kubernetes_upgrades_deployment" | indent 2 }} template: metadata: labels: diff --git a/ceph-provisioners/values.yaml b/ceph-provisioners/values.yaml index 7622bc6f7..783fbecff 100644 --- a/ceph-provisioners/values.yaml +++ b/ceph-provisioners/values.yaml @@ -105,6 +105,10 @@ pod: replicas: cephfs_provisioner: 2 rbd_provisioner: 2 + lifecycle: + upgrades: + deployments: + pod_replacement_strategy: Recreate affinity: anti: type: