Add endpoint and service to glance

Change-Id: I51e1a77276f464fd40b498dae62696b2c4aa7081
This commit is contained in:
okozachenko 2020-08-07 16:47:59 +03:00
parent 17ca6d3396
commit 9a3fd00884
1 changed files with 6 additions and 1 deletions

View File

@ -20,6 +20,7 @@ the appropriate deployments, Mcrouter, pod monitors and Prometheus rules.
from openstack_operator import database
from openstack_operator import identity
from openstack_operator import utils
@ -44,10 +45,14 @@ def create_or_resume(name, spec, **_):
name=name, spec=spec)
utils.create_or_update('glance/service.yml.j2',
name=name, spec=spec)
url = None
if "ingress" in spec:
utils.create_or_update('glance/ingress.yml.j2',
name=name, spec=spec)
url = spec["ingress"]["host"]
identity.ensure_service(name="glance", service_type="image",
url=url, desc="Glance Image Service")
def update(name, spec, **_):