From a8a7247a0b61b3d0d9cd8304c374de5b7ebd108f Mon Sep 17 00:00:00 2001 From: Pete Birley Date: Sat, 22 Apr 2017 11:53:19 -0500 Subject: [PATCH] Heat: Add rolling update strategy This ps adds a rolling update strategy to heat, bringing it inline with other core services. Change-Id: I702f2f351b4b34f68530617738e3d1566b71f0df --- heat/templates/deployment-api.yaml | 8 ++++++++ heat/templates/deployment-cfn.yaml | 8 ++++++++ heat/templates/deployment-cloudwatch.yaml | 8 ++++++++ heat/values.yaml | 7 +++++++ 4 files changed, 31 insertions(+) diff --git a/heat/templates/deployment-api.yaml b/heat/templates/deployment-api.yaml index d414dfc506..e54fd6cf2d 100755 --- a/heat/templates/deployment-api.yaml +++ b/heat/templates/deployment-api.yaml @@ -22,6 +22,14 @@ metadata: name: heat-api spec: replicas: {{ .Values.replicas.api }} + revisionHistoryLimit: {{ .Values.upgrades.revision_history }} + strategy: + type: {{ .Values.upgrades.pod_replacement_strategy }} + {{ if eq .Values.upgrades.pod_replacement_strategy "RollingUpdate" }} + rollingUpdate: + maxUnavailable: {{ .Values.upgrades.rolling_update.max_unavailable }} + maxSurge: {{ .Values.upgrades.rolling_update.max_surge }} + {{ end }} template: metadata: labels: diff --git a/heat/templates/deployment-cfn.yaml b/heat/templates/deployment-cfn.yaml index 1608174111..151009918f 100644 --- a/heat/templates/deployment-cfn.yaml +++ b/heat/templates/deployment-cfn.yaml @@ -22,6 +22,14 @@ metadata: name: heat-cfn spec: replicas: {{ .Values.replicas.cfn }} + revisionHistoryLimit: {{ .Values.upgrades.revision_history }} + strategy: + type: {{ .Values.upgrades.pod_replacement_strategy }} + {{ if eq .Values.upgrades.pod_replacement_strategy "RollingUpdate" }} + rollingUpdate: + maxUnavailable: {{ .Values.upgrades.rolling_update.max_unavailable }} + maxSurge: {{ .Values.upgrades.rolling_update.max_surge }} + {{ end }} template: metadata: labels: diff --git a/heat/templates/deployment-cloudwatch.yaml b/heat/templates/deployment-cloudwatch.yaml index f04bda3cf9..21914b9fce 100644 --- a/heat/templates/deployment-cloudwatch.yaml +++ b/heat/templates/deployment-cloudwatch.yaml @@ -22,6 +22,14 @@ metadata: name: heat-cloudwatch spec: replicas: {{ .Values.replicas.cloudwatch }} + revisionHistoryLimit: {{ .Values.upgrades.revision_history }} + strategy: + type: {{ .Values.upgrades.pod_replacement_strategy }} + {{ if eq .Values.upgrades.pod_replacement_strategy "RollingUpdate" }} + rollingUpdate: + maxUnavailable: {{ .Values.upgrades.rolling_update.max_unavailable }} + maxSurge: {{ .Values.upgrades.rolling_update.max_surge }} + {{ end }} template: metadata: labels: diff --git a/heat/values.yaml b/heat/values.yaml index 058f1a70ad..26667ef105 100644 --- a/heat/values.yaml +++ b/heat/values.yaml @@ -41,6 +41,13 @@ images: dep_check: docker.io/kolla/ubuntu-source-kubernetes-entrypoint:4.0.0 pull_policy: "IfNotPresent" +upgrades: + revision_history: 3 + pod_replacement_strategy: RollingUpdate + rolling_update: + max_unavailable: 1 + max_surge: 3 + keystone_secrets: admin: "heat-env-keystone-admin" user: "heat-env-keystone-user"