Skip to content

Instantly share code, notes, and snippets.

@sergei-zaiaev
sergei-zaiaev / kubeconfig-create.sh
Last active May 18, 2023 13:50
The script for kubeconfig generating.
#!/bin/sh
# This script creates a service account and role binding between it and provided role as well as generates kubeconfig file.
# Requirements:
# 1. connection to k8s cluster
# 2. presence of role for binding.
# List of arguments:
# 1. Server URL
@sergei-zaiaev
sergei-zaiaev / myaccessid_get_ssh_key.ps1
Created April 3, 2024 08:12
A script for generation of ssh key in .ppk format using only CLI tools
$BASE_URL="https://62.3.171.170:443"
$IDP_NAME="MyAccessIDAcc"
$SSH_TEMP_FOLDER = "/tmp/" # TODO: change me
# TODO: ensure your IP is whitelisted
# Invoke-WebRequest "$BASE_URL/provisioners"
function Generate-MAC {
param (
@sergei-zaiaev
sergei-zaiaev / cscs-waldur-ldap-integration.py
Created June 21, 2024 08:53
Script for integration between Waldur and CSCS LDAP system.
# Requires:
# python-waldur-client=^0.3.2
from waldur_client import WaldurClient, WaldurClientException
from collections import defaultdict
waldur_api_url = 'https://waldur.example.com/api/'
waldur_api_token = 'changeme' # Staff token
waldur_service_provider_uuid = 'changeme' # UUID of the service provider
def get_waldur_users():