Skip to content

Instantly share code, notes, and snippets.

@rawc0der
rawc0der / crd2jsonschema.sh
Last active September 18, 2024 14:42
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)
@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"