def main():
    deploy_options = deployment_options.load_deployment_options()
    utils.verify_build_directory(deploy_options.namespace)
    if (not deploy_options.apply_manifest):
        render_file(deploy_options.namespace, '', '')
        return
    secret_name = 'assisted-installer-local-auth-key'
    exists = utils.check_if_exists('secret', secret_name, target=deploy_options.target, namespace=deploy_options.namespace, profile=deploy_options.profile)
    if exists:
        print(f'Secret {secret_name} already exists in namespace {deploy_options.namespace}')
        return
    output_dir = tempfile.TemporaryDirectory()
    priv_path = os.path.join(output_dir.name, f'ec-private-key.pem')
    pub_path = os.path.join(output_dir.name, f'ec-public-key.pem')
    print(utils.check_output(f'openssl ecparam -name prime256v1 -genkey -noout -out {priv_path}'))
    print(utils.check_output(f'openssl ec -in {priv_path} -pubout -out {pub_path}'))
    secret_file = render_file(deploy_options.namespace, encoded_contents(priv_path), encoded_contents(pub_path))
    utils.apply(target=deploy_options.target, namespace=deploy_options.namespace, profile=deploy_options.profile, file=secret_file)
def main():
    deploy_options = deployment_options.load_deployment_options()
    utils.verify_build_directory(deploy_options.namespace)
    if (not deploy_options.apply_manifest):
        render_file(deploy_options.namespace, , )
        return
    secret_name = 'assisted-installer-local-auth-key'
    exists = utils.check_if_exists('secret', secret_name, target=deploy_options.target, namespace=deploy_options.namespace, profile=deploy_options.profile)
    if exists:
        print(f'Secret {secret_name} already exists in namespace {deploy_options.namespace}')
        return
    output_dir = tempfile.TemporaryDirectory()
    priv_path = os.path.join(output_dir.name, f'ec-private-key.pem')
    pub_path = os.path.join(output_dir.name, f'ec-public-key.pem')
    print(utils.check_output(f'openssl ecparam -name prime256v1 -genkey -noout -out {priv_path}'))
    print(utils.check_output(f'openssl ec -in {priv_path} -pubout -out {pub_path}'))
    secret_file = render_file(deploy_options.namespace, encoded_contents(priv_path), encoded_contents(pub_path))
    utils.apply(target=deploy_options.target, namespace=deploy_options.namespace, profile=deploy_options.profile, file=secret_file)