Пример #1
0
def encrypt(ctx: dict, plain_text: str, username: str, password: str,
            cluster_name: str):
    kubectl = ctx['kubectl']

    E.on(
        encrypt_secret(kubectl, plain_text, username, password, cluster_name),
        dict(success=lambda r: print('DONE: \n\nENCRYPTED TEXT: {}'.format(r)),
             failure=lambda e: print('FAILED: {}'.format(e))))
Пример #2
0
def register(ctx: dict, app_name: str, git_url: str, username: str,
             password: str, cluster_name: str):
    kubectl = ctx['kubectl']

    E.on(
        register_pipeline(kubectl, app_name, git_url, username, password,
                          cluster_name),
        dict(success=lambda r: print('DONE: {}'.format(r)),
             failure=lambda e: print('FAILED: {}'.format(e))))
Пример #3
0
def register(ctx: dict, agent_name: str, agent_template_path: str, image_url,
             username: str, password: str, cluster_name: str):
    kubectl = ctx['kubectl']

    E.on(
        register_agent_template(kubectl, agent_name, agent_template_path,
                                image_url, username, password, cluster_name),
        dict(success=lambda r: print('DONE: {}'.format(r)),
             failure=lambda e: print('FAILED: {}'.format(e)))
    )
Пример #4
0
def generate(ctx: dict, app_name: str, git_url: str, python_agent_name: str,
             krogon_file: str, username: str, password: str,
             cluster_name: str):
    kubectl = ctx['kubectl']
    project_id = ctx['project_id']
    service_account_b64 = ctx['service_account_b64']
    krogon_install_url = ctx['krogon_install_url']

    E.on(
        generate_pipeline(kubectl, project_id, service_account_b64, app_name,
                          git_url, python_agent_name, krogon_file,
                          krogon_install_url, username, password,
                          cluster_name),
        dict(success=lambda r: print('DONE: {}'.format(r)),
             failure=lambda e: print('FAILED: {}'.format(e))))
Пример #5
0
def generate(agent_name: str, out_dir: str, image_url: str):
    E.on(
        generate_agent_templates(agent_name, out_dir, image_url),
        dict(success=lambda r: print('DONE: {}'.format(r)),
             failure=lambda e: print('FAILED: {}'.format(e)))
    )