Add configmap hashing and rolling update to cinder

This brings Cinder in line with the following PRs:
 * https://github.com/att-comdev/openstack-helm/pull/98
 * https://github.com/att-comdev/openstack-helm/pull/97
This commit is contained in:
portdirect 2017-01-10 02:06:56 +00:00 committed by Pete Birley
parent 3f491f5be7
commit 3163f1e64c
3 changed files with 32 additions and 3 deletions

View File

@ -3,12 +3,22 @@ kind: Deployment
metadata: metadata:
name: cinder-api name: cinder-api
spec: spec:
replicas: {{ .Values.replicas }} 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: template:
metadata: metadata:
labels: labels:
app: cinder-api app: cinder-api
annotations: annotations:
configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "hash" }}
configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "hash" }}
pod.beta.kubernetes.io/init-containers: '[ pod.beta.kubernetes.io/init-containers: '[
{ {
"name": "init", "name": "init",

View File

@ -3,12 +3,22 @@ kind: Deployment
metadata: metadata:
name: cinder-volume name: cinder-volume
spec: spec:
replicas: {{ .Values.replicas }} replicas: {{ .Values.replicas.volume }}
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: template:
metadata: metadata:
labels: labels:
app: cinder-volume app: cinder-volume
annotations: annotations:
configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "hash" }}
configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "hash" }}
pod.beta.kubernetes.io/init-containers: '[ pod.beta.kubernetes.io/init-containers: '[
{ {
"name": "init", "name": "init",

View File

@ -3,7 +3,9 @@
# Declare name/value pairs to be passed into your templates. # Declare name/value pairs to be passed into your templates.
# name: value # name: value
replicas: 1 replicas:
api: 1
volume: 1
labels: labels:
node_selector_key: openstack-control-plane node_selector_key: openstack-control-plane
@ -20,6 +22,13 @@ images:
volume: quay.io/stackanetes/stackanetes-cinder-volume:newton volume: quay.io/stackanetes/stackanetes-cinder-volume:newton
pull_policy: "IfNotPresent" pull_policy: "IfNotPresent"
upgrades:
revision_history: 3
pod_replacement_strategy: RollingUpdate
rolling_update:
max_unavailable: 1
max_surge: 3
keystone: keystone:
auth_uri: "http://keystone-api:5000" auth_uri: "http://keystone-api:5000"
auth_url: "http://keystone-api:35357" auth_url: "http://keystone-api:35357"