#!/usr/bin/env python3

import adhesive
import shlex
import os

curdir = os.getcwd()


class Data:
    secret_name: str
    cert_file: str
    key_file: str


@adhesive.usertask('Secret Details')
def ui_secret_details(token: adhesive.Token[Data], ui):
    ui.add_input_text("secret_name", "Secret Name")
    ui.add_input_text("cert_file", "Certificate File")
    ui.add_input_text("key_file", "Key File")


@adhesive.task("Create secret {secret_name}")
def create_secret(token: adhesive.Token[Data]) -> None:
    token.workspace.run(f"""
        cd {shlex.quote(curdir)}
        kubectl create secret tls {token.data.secret_name} \
                --cert={shlex.quote(token.data.cert_file)} \
                --key={shlex.quote(token.data.key_file)}
    """)


adhesive.build()

00442db23a950723cf2f5ff8944ae9e2710daacd
<mask token>


class Data:
    secret_name: str
    cert_file: str
    key_file: str


@adhesive.usertask('Secret Details')
def ui_secret_details(token: adhesive.Token[Data], ui):
    ui.add_input_text('secret_name', 'Secret Name')
    ui.add_input_text('cert_file', 'Certificate File')
    ui.add_input_text('key_file', 'Key File')


@adhesive.task('Create secret {secret_name}')
def create_secret(token: adhesive.Token[Data]) ->None:
    token.workspace.run(
        f"""
        cd {shlex.quote(curdir)}
        kubectl create secret tls {token.data.secret_name}                 --cert={shlex.quote(token.data.cert_file)}                 --key={shlex.quote(token.data.key_file)}
    """
        )


<mask token>

<mask token>


class Data:
    secret_name: str
    cert_file: str
    key_file: str


@adhesive.usertask('Secret Details')
def ui_secret_details(token: adhesive.Token[Data], ui):
    ui.add_input_text('secret_name', 'Secret Name')
    ui.add_input_text('cert_file', 'Certificate File')
    ui.add_input_text('key_file', 'Key File')


@adhesive.task('Create secret {secret_name}')
def create_secret(token: adhesive.Token[Data]) ->None:
    token.workspace.run(
        f"""
        cd {shlex.quote(curdir)}
        kubectl create secret tls {token.data.secret_name}                 --cert={shlex.quote(token.data.cert_file)}                 --key={shlex.quote(token.data.key_file)}
    """
        )


adhesive.build()

<mask token>
curdir = os.getcwd()


class Data:
    secret_name: str
    cert_file: str
    key_file: str


@adhesive.usertask('Secret Details')
def ui_secret_details(token: adhesive.Token[Data], ui):
    ui.add_input_text('secret_name', 'Secret Name')
    ui.add_input_text('cert_file', 'Certificate File')
    ui.add_input_text('key_file', 'Key File')


@adhesive.task('Create secret {secret_name}')
def create_secret(token: adhesive.Token[Data]) ->None:
    token.workspace.run(
        f"""
        cd {shlex.quote(curdir)}
        kubectl create secret tls {token.data.secret_name}                 --cert={shlex.quote(token.data.cert_file)}                 --key={shlex.quote(token.data.key_file)}
    """
        )


adhesive.build()

import adhesive
import shlex
import os
curdir = os.getcwd()


class Data:
    secret_name: str
    cert_file: str
    key_file: str


@adhesive.usertask('Secret Details')
def ui_secret_details(token: adhesive.Token[Data], ui):
    ui.add_input_text('secret_name', 'Secret Name')
    ui.add_input_text('cert_file', 'Certificate File')
    ui.add_input_text('key_file', 'Key File')


@adhesive.task('Create secret {secret_name}')
def create_secret(token: adhesive.Token[Data]) ->None:
    token.workspace.run(
        f"""
        cd {shlex.quote(curdir)}
        kubectl create secret tls {token.data.secret_name}                 --cert={shlex.quote(token.data.cert_file)}                 --key={shlex.quote(token.data.key_file)}
    """
        )


adhesive.build()

#!/usr/bin/env python3

import adhesive
import shlex
import os

curdir = os.getcwd()


class Data:
    secret_name: str
    cert_file: str
    key_file: str


@adhesive.usertask('Secret Details')
def ui_secret_details(token: adhesive.Token[Data], ui):
    ui.add_input_text("secret_name", "Secret Name")
    ui.add_input_text("cert_file", "Certificate File")
    ui.add_input_text("key_file", "Key File")


@adhesive.task("Create secret {secret_name}")
def create_secret(token: adhesive.Token[Data]) -> None:
    token.workspace.run(f"""
        cd {shlex.quote(curdir)}
        kubectl create secret tls {token.data.secret_name} \
                --cert={shlex.quote(token.data.cert_file)} \
                --key={shlex.quote(token.data.key_file)}
    """)


adhesive.build()
