Fix horizon missing in operator deployment

Change-Id: I3046bfee8e8ddcbdcfa1aac2ba4bece724968b10
This commit is contained in:
okozachenko 2020-08-04 16:37:26 +03:00
parent bcf721e5f0
commit 401ae500af

View File

@ -22,13 +22,12 @@ the appropriate deployments, Mcrouter, pod monitors and Prometheus rules.
from openstack_operator import utils from openstack_operator import utils
def create_secret(name, **_): def create_secret():
"""Create a new horizon secret""" """Create a new horizon secret for secretKey"""
res = utils.get_secret("openstack", name) res = utils.get_secret("openstack", "horizon")
if res is None: if res is None:
utils.create_or_update('horizon/secret-secretkey.yml.j2', utils.create_or_update('horizon/secret-secretkey.yml.j2',
name=name,
secret=utils.generate_password()) secret=utils.generate_password())
@ -40,6 +39,7 @@ def create_or_resume(name, spec, **_):
""" """
# Grab the secretkey secret # Grab the secretkey secret
create_secret()
config = utils.create_or_update('horizon/configmap.yml.j2', config = utils.create_or_update('horizon/configmap.yml.j2',
name=name, spec=spec) name=name, spec=spec)
config_hash = utils.generate_hash(config.obj['data']) config_hash = utils.generate_hash(config.obj['data'])