Skip to content

Instantly share code, notes, and snippets.

@nickzelei
nickzelei / main.go
Created February 14, 2023 03:34
STS V2 Presign K8s Token
package main
import (
"context"
"encoding/base64"
"fmt"
"net/http"
"time"
"github.com/aws/aws-sdk-go-v2/aws"
@rawc0der
rawc0der / crd2jsonschema.sh
Last active August 1, 2025 04:22
Extract openapi JSON schema from Kubernetes CRD manifest
#!/bin/bash
# Small utility function based on yq to extract openAPIV3Schema from CRD
# example: crd2jsonschema.sh ./crd-alertmanager.yaml
set -e
function crd2jsonschema() {
set -e
local xkgroup="x-kubernetes-group-version-kind"
local document="$1"
local openAPIV3Schema=$(mktemp -u)
@riccardomc
riccardomc / oidc-thumbprint-regions.sh
Created November 28, 2019 11:19
Extract OIDC provider thumbprint for all AWS Region with EKS support
#!/bin/bash
set -e
if [ ! -z "$DEBUG" ] ; then
set -x
fi
REGIONS="us-east-2
us-east-1
@riccardomc
riccardomc / oidc-thumbprint.sh
Created November 28, 2019 10:52
Extract OIDC provider thumbprint given an AWS EKS cluster name
#!/bin/bash
set -e
if [ ! -z "$DEBUG" ] ; then
set -x
fi
CLUSTER_NAME=$1