Skip to content

Instantly share code, notes, and snippets.

View robert-cronin's full-sized avatar
📡
Looking to the future

Robbie Cronin robert-cronin

📡
Looking to the future
View GitHub Profile

Keybase proof

I hereby claim:

  • I am robert-cronin on github.

  • I am robertcronin (https://keybase.io/robertcronin) on keybase.

  • I have a public key ASAkQe0j9K4OyHC7eTAu1g_DxiWrn7PIixaQo71aFhIxqQo

@robert-cronin
robert-cronin / k8s_module_coverage.sh
Last active June 1, 2024 00:36
Hunting for packages with low test coverage in Kubernetes
#!/bin/bash
set -o errexit
# run this script from kubernetes root directory to generate and open a coverage report for a package
# first arg is the package path to run the tests for
# example: ./script.sh staging/src/k8s.io/kubelet
# make temp dir
TEMP_DIR=$(mktemp -d)
@robert-cronin
robert-cronin / debug-pod.sh
Created June 12, 2024 04:48
Attach an ephemeral debug container (busybox) to a pod
#!/bin/bash
POD_NAME=$1
POD_NAMESPACE=$2
if [[ -z $POD_NAME || -z $POD_NAMESPACE ]]; then
echo "Usage: $0 POD_NAME POD_NAMESPACE"
exit 1
fi
@robert-cronin
robert-cronin / concatenate_repo.sh
Last active June 18, 2024 00:15
A script for concatenating all the files of a git repo into one file which you can feed into large context LLMs for understanding dependencies
#!/bin/bash
# Check if the script received the correct number of arguments
if [ "$#" -ne 2 ]; then
echo "Usage: $0 <repo_path> <output_file>"
exit 1
fi
REPO_PATH=$1
OUTPUT_FILE=$2
@robert-cronin
robert-cronin / reflect_secret.sh
Created June 24, 2024 11:08
Just a shortcut to add reflector annotations to a secret so that it reflects to a target namespace (docs: https://github.com/emberstack/kubernetes-reflector?tab=readme-ov-file#usage)
#!/bin/bash
# Copyright 2024 Robert Cronin
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#