Example #1
0
def pre_deployment_hook(route, labels):
    name, spec = _init_route(route)
    deis_instance_id = spec['deis-instance-id']
    if kubectl.get(f'ns {deis_instance_id}', required=False):
        print(
            f'updating route name {name} for deis instance {deis_instance_id}')
        route_service = kubectl.get_resource('v1',
                                             'Service',
                                             name,
                                             labels,
                                             namespace=deis_instance_id)
        route_service['spec'] = {
            'ports': [{
                'name': '5000',
                'port': 5000
            }],
            'selector': {
                'app': 'ckan'
            }
        }
        kubectl.apply(route_service)
Example #2
0
def get_backend_url(route):
    name, spec = _init_route(route)
    return ckan_instance_manager.get_backend_url(spec['ckan-instance-id'])
def get_backend_url(route):
    name, spec = _init_route(route)
    deis_instance_id = spec['deis-instance-id']
    target_port = _get_instance_target_port(deis_instance_id)
    return f'http://{name}.{deis_instance_id}:{target_port}'
Example #4
0
def get_backend_url(route):
    name, spec = _init_route(route)
    return apps_manager.get_backend_url(spec['app-instance-id'])
Example #5
0
def get_backend_url(route):
    name, spec = _init_route(route)
    datapusher_name = spec['datapusher-name']
    return datapushers.get_service_url(datapusher_name)
Example #6
0
def pre_deployment_hook(route, labels):
    name, spec = _init_route(route)
    datapusher_name = spec['datapusher-name']
    print(f'updating route name {name} for datapusher name {datapusher_name}')
    datapushers.update_service(datapusher_name, labels)
Example #7
0
def get_backend_url(route):
    name, spec = _init_route(route)
    deis_instance_id = spec['deis-instance-id']
    return f'http://{name}.{deis_instance_id}:5000'