Skip to content

Instantly share code, notes, and snippets.

View uncycler's full-sized avatar

Frédéric Marchand uncycler

View GitHub Profile
#!/bin/bash
# Drain all nodes gracefully and rely on cluster autoscaler to create new one!
set -e
# Retrieve ASG with tag application=kubernetes
for i in $(aws autoscaling describe-auto-scaling-groups --query 'AutoScalingGroups[?contains(Tags[?Key==`application`].Value, `kubernetes`)].AutoScalingGroupName' --output text) ; do
cluster=$(echo $i | cut -d'-' -f1)
echo "Working on cluster $cluster"
#!/usr/bin/python3
import xml.dom.minidom
import csv
import glob
for file in glob.glob('CAMT.053*.xml'):
print(file)
camt = xml.dom.minidom.parse(file)
document = camt.documentElement