From c9d27bac4d84cb5dd8fe2d393c7f54896ce6485c Mon Sep 17 00:00:00 2001 From: Alan Meadows Date: Mon, 9 Jan 2017 15:08:46 -0800 Subject: [PATCH] Add rolling update parameters to all current charts This ensures that all charts have a consistent and overridable approach to their pod replacement strategies, along with sane defaults. --- glance/templates/api.yaml | 9 +++++++++ glance/values.yaml | 7 +++++++ horizon/templates/deployment.yaml | 8 ++++++++ horizon/values.yaml | 7 +++++++ keystone/templates/deployment.yaml | 8 ++++++++ keystone/values.yaml | 7 +++++++ memcached/templates/deployment.yaml | 8 ++++++++ memcached/values.yaml | 7 +++++++ neutron/templates/deployment-server.yaml | 8 ++++++++ neutron/values.yaml | 7 +++++++ rabbitmq/templates/deployment.yaml | 8 ++++++++ rabbitmq/values.yaml | 8 +++++++- 12 files changed, 91 insertions(+), 1 deletion(-) diff --git a/glance/templates/api.yaml b/glance/templates/api.yaml index 659e53a399..53e9cc77b0 100644 --- a/glance/templates/api.yaml +++ b/glance/templates/api.yaml @@ -4,6 +4,14 @@ metadata: name: glance-api spec: replicas: {{ .Values.replicas }} + 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: @@ -37,6 +45,7 @@ spec: spec: nodeSelector: {{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }} + containers: - name: glance-api image: {{ .Values.images.api }} diff --git a/glance/values.yaml b/glance/values.yaml index a94a1bcc1c..a3c6886a54 100644 --- a/glance/values.yaml +++ b/glance/values.yaml @@ -17,6 +17,13 @@ images: post: quay.io/stackanetes/stackanetes-kolla-toolbox:newton pull_policy: "IfNotPresent" +upgrades: + revision_history: 3 + pod_replacement_strategy: RollingUpdate + rolling_update: + max_unavailable: 1 + max_surge: 3 + keystone: auth_uri: "http://keystone-api:5000" auth_url: "http://keystone-api:35357" diff --git a/horizon/templates/deployment.yaml b/horizon/templates/deployment.yaml index 2baa6bc36f..f3a65f02e7 100644 --- a/horizon/templates/deployment.yaml +++ b/horizon/templates/deployment.yaml @@ -4,6 +4,14 @@ metadata: name: horizon spec: replicas: {{ .Values.replicas }} + 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/horizon/values.yaml b/horizon/values.yaml index 6de7d8e116..a7d97e6121 100644 --- a/horizon/values.yaml +++ b/horizon/values.yaml @@ -10,6 +10,13 @@ images: horizon: quay.io/stackanetes/stackanetes-horizon:newton pull_policy: "IfNotPresent" +upgrades: + revision_history: 3 + pod_replacement_strategy: RollingUpdate + rolling_update: + max_unavailable: 1 + max_surge: 3 + labels: node_selector_key: openstack-control-plane node_selector_value: enabled diff --git a/keystone/templates/deployment.yaml b/keystone/templates/deployment.yaml index 2a94d2498c..827cb9c3b9 100644 --- a/keystone/templates/deployment.yaml +++ b/keystone/templates/deployment.yaml @@ -4,6 +4,14 @@ metadata: name: keystone-api spec: replicas: {{ .Values.replicas }} + 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/keystone/values.yaml b/keystone/values.yaml index 80801204e7..a89452e14d 100644 --- a/keystone/values.yaml +++ b/keystone/values.yaml @@ -16,6 +16,13 @@ images: entrypoint: quay.io/stackanetes/kubernetes-entrypoint:v0.1.0 pull_policy: "IfNotPresent" +upgrades: + revision_history: 3 + pod_replacement_strategy: RollingUpdate + rolling_update: + max_unavailable: 1 + max_surge: 3 + keystone: version: v3 scheme: http diff --git a/memcached/templates/deployment.yaml b/memcached/templates/deployment.yaml index 41dd4faa0e..020265758e 100644 --- a/memcached/templates/deployment.yaml +++ b/memcached/templates/deployment.yaml @@ -4,6 +4,14 @@ metadata: name: memcached spec: replicas: {{ .Values.resources.memcached.replicas }} + 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/memcached/values.yaml b/memcached/values.yaml index 16c0e7020c..c00dcdcc03 100644 --- a/memcached/values.yaml +++ b/memcached/values.yaml @@ -7,6 +7,13 @@ images: memcached: quay.io/stackanetes/stackanetes-memcached:newton pull_policy: "IfNotPresent" +upgrades: + revision_history: 3 + pod_replacement_strategy: RollingUpdate + rolling_update: + max_unavailable: 1 + max_surge: 3 + labels: node_selector_key: openstack-control-plane node_selector_value: enabled diff --git a/neutron/templates/deployment-server.yaml b/neutron/templates/deployment-server.yaml index 21004eb353..a9c37a3458 100644 --- a/neutron/templates/deployment-server.yaml +++ b/neutron/templates/deployment-server.yaml @@ -4,6 +4,14 @@ metadata: name: neutron-server spec: replicas: {{ .Values.replicas.server }} + 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/neutron/values.yaml b/neutron/values.yaml index f37c9006bd..434ea41fd7 100644 --- a/neutron/values.yaml +++ b/neutron/values.yaml @@ -20,6 +20,13 @@ images: entrypoint: quay.io/stackanetes/kubernetes-entrypoint:v0.1.0 pull_policy: "IfNotPresent" +upgrades: + revision_history: 3 + pod_replacement_strategy: RollingUpdate + rolling_update: + max_unavailable: 1 + max_surge: 3 + labels: # ovs is a special case, requiring a special # label that can apply to both control hosts diff --git a/rabbitmq/templates/deployment.yaml b/rabbitmq/templates/deployment.yaml index 21bbd5f8fa..d4c19ccf9c 100644 --- a/rabbitmq/templates/deployment.yaml +++ b/rabbitmq/templates/deployment.yaml @@ -4,6 +4,14 @@ metadata: name: rabbitmq spec: replicas: {{ .Values.replicas }} + 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/rabbitmq/values.yaml b/rabbitmq/values.yaml index 1efabe6964..8d44741b0b 100644 --- a/rabbitmq/values.yaml +++ b/rabbitmq/values.yaml @@ -8,7 +8,13 @@ replicas: "1" # this must be quoted to deal with atoi labels: node_selector_key: openstack-control-plane node_selector_value: enabled - + +upgrades: + revision_history: 3 + pod_replacement_strategy: RollingUpdate + rolling_update: + max_unavailable: 1 + max_surge: 3 auth: default_user: openstack default_pass: password