Add endpoint and service to magnum
Change-Id: I1a25436cfae6da190bd15ed2be46ad1152f2507b
This commit is contained in:
parent
c2ca1c746d
commit
21b1d731c6
@ -113,13 +113,6 @@ function create_magnum_accounts {
|
||||
|
||||
create_service_user "magnum" "admin"
|
||||
|
||||
get_or_create_service "magnum" "container-infra" "Container Infrastructure Management Service"
|
||||
get_or_create_endpoint "container-infra" \
|
||||
"$REGION_NAME" \
|
||||
"$MAGNUM_SERVICE_PROTOCOL://$MAGNUM_SERVICE_HOST:$MAGNUM_SERVICE_PORT/v1" \
|
||||
"$MAGNUM_SERVICE_PROTOCOL://$MAGNUM_SERVICE_HOST:$MAGNUM_SERVICE_PORT/v1" \
|
||||
"$MAGNUM_SERVICE_PROTOCOL://$MAGNUM_SERVICE_HOST:$MAGNUM_SERVICE_PORT/v1"
|
||||
|
||||
# Create for Kubernetes Keystone auth
|
||||
get_or_create_role k8s_admin
|
||||
get_or_create_role k8s_developer
|
||||
|
@ -20,6 +20,7 @@ server for the installation.
|
||||
"""
|
||||
|
||||
from openstack_operator import database
|
||||
from openstack_operator import identity
|
||||
from openstack_operator import utils
|
||||
|
||||
|
||||
@ -30,7 +31,6 @@ def create_or_resume(name, spec, **_):
|
||||
start the service up for the first time.
|
||||
"""
|
||||
|
||||
# deploy mysql
|
||||
if "mysql" not in spec:
|
||||
spec["mysql"] = {}
|
||||
database.ensure_mysql_cluster("magnum", spec["mysql"])
|
||||
@ -54,9 +54,16 @@ def create_or_resume(name, spec, **_):
|
||||
|
||||
utils.create_or_update('magnum/service.yml.j2',
|
||||
name=name)
|
||||
|
||||
url = None
|
||||
if "ingress" in spec:
|
||||
utils.create_or_update('magnum/ingress.yml.j2',
|
||||
name=name, spec=spec)
|
||||
url = spec["ingress"]["host"]
|
||||
# Create service and endpoints
|
||||
identity.ensure_service(name="magnum-api", service="container-infra",
|
||||
url=url, desc="Container Infrastructure \
|
||||
Management Service")
|
||||
|
||||
|
||||
def update(name, spec, **_):
|
||||
|
Loading…
Reference in New Issue
Block a user