Skip to content

Instantly share code, notes, and snippets.

View ninadpundalik's full-sized avatar

Ninad Pundalik ninadpundalik

View GitHub Profile
@dbafromthecold
dbafromthecold / DecodeHelmSecrets.sh
Created August 16, 2020 13:06
A kubectl plugin to decode secrets created by Helm
#!/bin/bash
# get helm secrets from Kubernetes cluster
SECRET=$(kubectl get secret $1 -o jsonpath='{ .data.release }' )
# decode the secrets
DECODED_SECRET=$(echo $SECRET | base64 -d | base64 -d | gunzip -c )
# parse the decoded secrets, pulling out the templates and removing whitespace
DATA=$(echo $DECODED_SECRET | jq '.chart.templates[]' | tr -d '[:space:]' )
#!/usr/bin/python
import requests
import sys
import json
import pprint
from time import sleep
#This is the user ID going on vacation
vacationing_user = 'PR2D0IM'