Fix pod annotation for keystone and horizon

Change-Id: I80b4f6ca77445b08b30aab3019d1f49c98d14434
This commit is contained in:
okozachenko
2020-05-25 20:37:38 +03:00
parent 5bb1c87d15
commit 70f6aac78a
5 changed files with 14 additions and 5 deletions
+5 -2
View File
@@ -34,12 +34,15 @@ def create_or_resume(name, spec, **_):
"""
env = utils.get_uwsgi_env()
config_hash = utils.generate_hash(spec)
for component in ("api", "api-cfn"):
utils.create_or_update('heat/deployment.yml.j2',
name=name, spec=spec,
component=component, env=env)
component=component, env=env,
config_hash=config_hash)
utils.create_or_update('heat/service.yml.j2',
name=name, component=component)
utils.create_or_update('heat/deployment.yml.j2',
name=name, spec=spec, component='engine')
name=name, spec=spec, component='engine',
config_hash=config_hash)
+3 -1
View File
@@ -31,8 +31,10 @@ def create_or_resume(name, spec, **_):
start the service up for the first time.
"""
env = utils.get_uwsgi_env()
config_hash = utils.generate_hash(spec)
utils.create_or_update('keystone/deployment.yml.j2',
name=name, spec=spec, env=env)
name=name, spec=spec,
env=env, config_hash=config_hash)
utils.create_or_update('keystone/service.yml.j2',
name=name, spec=spec)
utils.create_or_update('keystone/horizontalpodautoscaler.yml.j2',
@@ -35,6 +35,8 @@ spec:
metadata:
labels:
{{ labels("heat", name, component) | indent(8) }}
annotations:
checksum/config: "{{ config_hash }}"
spec:
containers:
- name: heat-{{ component }}
@@ -20,8 +20,6 @@ metadata:
namespace: openstack
labels:
{{ labels("horizon", name) | indent(4) }}
annotations:
checksum/config: "{{ config_hash }}"
spec:
replicas: 3
selector:
@@ -31,6 +29,8 @@ spec:
metadata:
labels:
{{ labels("horizon", name) | indent(8) }}
annotations:
checksum/config: "{{ config_hash }}"
spec:
containers:
- name: horizon
@@ -29,6 +29,8 @@ spec:
metadata:
labels:
{{ labels("keystone", name) | indent(8) }}
annotations:
checksum/config: "{{ config_hash }}"
spec:
containers:
- name: keystone