Alan Meadows 0a481a8ef2 Consistent config map hashing across all existing charts
* These annotations ensure that if configmaps change, the pods
are redeployed according to their upgrade strategy.

* This change excludes glance which has a pull request in progress
to refactor it.
2017-01-09 15:18:58 -08:00

52 lines
1.7 KiB
YAML

kind: Deployment
apiVersion: extensions/v1beta1
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:
app: rabbitmq
annotations:
configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "hash" }}
spec:
nodeSelector:
{{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }}
volumes:
- name: rabbitmq-emptydir
emptyDir: {}
- name: rabbitmq-bin
configMap:
name: rabbitmq-bin
containers:
- name: rabbitmq
image: {{ .Values.images.rabbitmq }}
command:
- bash
- /tmp/start_rabbitmq.sh
livenessProbe:
tcpSocket:
port: {{.Values.network.port.public}}
initialDelaySeconds: 60
timeoutSeconds: 5
ports:
- name: rabbitmq
containerPort: {{.Values.network.port.public}}
- name: management
containerPort: {{.Values.network.port.management}}
volumeMounts:
- name: rabbitmq-emptydir
mountPath: /var/lib/rabbitmq
- name: rabbitmq-bin
mountPath: /tmp/start_rabbitmq.sh
subPath: start_rabbitmq.sh