Ejemplo n.º 1
0
def _wait_on_namespace_resources(namespace, timeout, db_only=False):
    if db_only:
        time_taken = wait_for_db_resources(namespace, timeout)
    else:
        time_taken = wait_for_all_resources(namespace, timeout)
    if time_taken >= timeout:
        _error("Timed out waiting for resources; exiting")
Ejemplo n.º 2
0
def add_base_resources(namespace, secret_names):
    copy_namespace_secrets(conf.BASE_NAMESPACE_NAME, namespace, secret_names)

    with open(conf.EPHEMERAL_CLUSTER_CLOWDENV_TEMPLATE) as fp:
        template_data = yaml.safe_load(fp)

    processed_template = process_template(
        template_data,
        params={
            "ENV_NAME": conf.ENV_NAME_FORMAT.format(namespace=namespace),
            "NAMESPACE": namespace,
        },
    )

    oc("apply", f="-", _in=json.dumps(processed_template))

    # wait for any deployed base resources to become 'ready'
    wait_for_all_resources(namespace, timeout=conf.RECONCILE_TIMEOUT)
Ejemplo n.º 3
0
def _wait_on_namespace_resources(namespace, timeout):
    time_taken = wait_for_all_resources(namespace, timeout)
    if time_taken >= timeout:
        _error("Timed out waiting for resources; exiting")
Ejemplo n.º 4
0
def _wait_on_namespace_resources(namespace, timeout, db_only=False):
    if db_only:
        wait_for_db_resources(namespace, timeout)
    else:
        wait_for_all_resources(namespace, timeout)