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

94 lines
3.1 KiB
YAML

apiVersion: extensions/v1beta1
kind: Deployment
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:
app: keystone-api
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: '[
{
"name": "init",
"image": "{{ .Values.images.entrypoint }}",
"imagePullPolicy": "{{ .Values.images.pull_policy }}",
"env": [
{
"name": "NAMESPACE",
"value": "{{ .Release.Namespace }}"
},
{
"name": "INTERFACE_NAME",
"value": "eth0"
},
{
"name": "DEPENDENCY_SERVICE",
"value": "{{ include "joinListWithColon" .Values.dependencies.api.service }}"
},
{
"name": "DEPENDENCY_JOBS",
"value": "{{ include "joinListWithColon" .Values.dependencies.api.jobs }}"
},
{
"name": "COMMAND",
"value": "echo done"
}
]
}
]'
spec:
nodeSelector:
{{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }}
containers:
- name: keystone-api
image: {{ .Values.images.api }}
imagePullPolicy: {{ .Values.images.pull_policy }}
command:
- bash
- /tmp/start.sh
ports:
- containerPort: {{ .Values.network.port.public }}
- containerPort: {{ .Values.network.port.admin }}
readinessProbe:
tcpSocket:
port: {{ .Values.network.port.public }}
volumeMounts:
- name: keystoneconf
mountPath: /etc/keystone/keystone.conf
subPath: keystone.conf
- name: wsgikeystone
mountPath: /etc/apache2/conf-enabled/wsgi-keystone.conf
subPath: wsgi-keystone.conf
- name: mpmeventconf
mountPath: /etc/apache2/mods-available/mpm_event.conf
subPath: mpm_event.conf
- name: startsh
mountPath: /tmp/start.sh
subPath: start.sh
volumes:
- name: keystoneconf
configMap:
name: keystone-etc
- name: wsgikeystone
configMap:
name: keystone-etc
- name: mpmeventconf
configMap:
name: keystone-etc
- name: startsh
configMap:
name: keystone-bin