Merge "Add initcontainer to heat"
This commit is contained in:
commit
a38582dacc
@ -219,10 +219,6 @@ function init_heat {
|
|||||||
if is_service_enabled $DATABASE_BACKENDS; then
|
if is_service_enabled $DATABASE_BACKENDS; then
|
||||||
# (re)create heat database
|
# (re)create heat database
|
||||||
recreate_database heat
|
recreate_database heat
|
||||||
|
|
||||||
time_start "dbsync"
|
|
||||||
sudo docker run -v $HEAT_CONF_DIR:$HEAT_CONF_DIR vexxhost/heat-engine:latest heat-manage db_sync
|
|
||||||
time_stop "dbsync"
|
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -28,6 +28,11 @@ metadata:
|
|||||||
{{ labels("heat", name, component) | indent(4) }}
|
{{ labels("heat", name, component) | indent(4) }}
|
||||||
spec:
|
spec:
|
||||||
replicas: 3
|
replicas: 3
|
||||||
|
strategy:
|
||||||
|
type: RollingUpdate
|
||||||
|
rollingUpdate:
|
||||||
|
maxSurge: 1
|
||||||
|
maxUnavailable: 0
|
||||||
selector:
|
selector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
{{ labels("heat", name, component) | indent(6) }}
|
{{ labels("heat", name, component) | indent(6) }}
|
||||||
@ -38,6 +43,18 @@ spec:
|
|||||||
annotations:
|
annotations:
|
||||||
checksum/config: "{{ config_hash }}"
|
checksum/config: "{{ config_hash }}"
|
||||||
spec:
|
spec:
|
||||||
|
{% if 'engine' in component %}
|
||||||
|
initContainers:
|
||||||
|
- name: db-sync
|
||||||
|
image: vexxhost/heat-{{ component }}:latest
|
||||||
|
imagePullPolicy: Always
|
||||||
|
command:
|
||||||
|
- heat-manage
|
||||||
|
- db_sync
|
||||||
|
volumeMounts:
|
||||||
|
- mountPath: /etc/heat
|
||||||
|
name: config
|
||||||
|
{% endif %}
|
||||||
containers:
|
containers:
|
||||||
- name: heat-{{ component }}
|
- name: heat-{{ component }}
|
||||||
image: vexxhost/heat-{{ component }}:latest
|
image: vexxhost/heat-{{ component }}:latest
|
||||||
|
Loading…
Reference in New Issue
Block a user