Skip to content

Instantly share code, notes, and snippets.

View cmwylie19's full-sized avatar

Case Wylie cmwylie19

View GitHub Profile
@cmwylie19
cmwylie19 / latest-repo-tags.sh
Last active July 29, 2026 16:19
get the latest
#!/usr/bin/env bash
set -euo pipefail
REGISTRY="${1:-registry.defenseunicorns.com}"
BASE="oci://registry.defenseunicorns.com"
crane catalog "$REGISTRY" | egrep "navy-tide" | egrep -v "dos-games|matrix" | while read -r repo; do
[ -z "$repo" ] && continue
latest="$(
crane ls "$REGISTRY/$repo" 2>/dev/null \
find . -name '*.zst' -ok rm {} \;
find . -name '*.raw' -ok rm {} \;
find . -name '*.iso' -ok rm {} \;
docker image prune -a -f
docker volume prune -a -f
docker builder prune -a -f
docker system prune -a -f
zarf tools clear-cache && rm -rf /tmp/zarf-*
rm -rf ~/.uds-cache
rm -rf /tmp/uds-*
➜  must-gather git:(main) zarf package publish zarf-package-uds-must-gather-amd64-1.1.0.tar.zst oci://registry.defenseunicorns.com/navy-tide/uds-must-gather
2026-07-13 14:21:56 WRN package signature could not be verified: error=package is not signed - verification cannot be performed
2026-07-13 14:21:56 INF skipping package signing (no signing key material configured)
2026-07-13 14:21:56 INF pushing package to registry destination=registry.defenseunicorns.com/navy-tide/uds-must-gather/uds-must-gather:1.1.0 architecture=amd64 size=7.98 MBs
2026-07-13 14:22:01 INF package publish in progress name=registry.defenseunicorns.com/navy-tide/uds-must-gather/uds-must-gather:1.1.0 complete=100.0% remaining=0.00 Byte
2026-07-13 14:22:02 INF completed package publish destination=registry.defenseunicorns.com/navy-tide/uds-must-gather/uds-must-gather:1.1.0 duration=5.2s
➜  must-gather git:(main) 
@cmwylie19
cmwylie19 / AlertManager.md
Last active May 18, 2026 01:40
alert manager

Demo

Use the default namespace for the demo

```bash
 ssh -D 1080 cmwylie19@192.168.4.90

/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome \
--user-data-dir=/tmp/chrome-socks \
--proxy-server="socks5://127.0.0.1:1080"
@cmwylie19
cmwylie19 / EXEC_PEPR_IMAGE.md
Last active January 15, 2026 15:48
execing into pepr image to debug

Read node modules:

docker run --rm --entrypoint node pepr:dev  -e "console.log(require('fs').readdirSync('node_modules').join('\n'))"

Read a node module

docker run --rm --entrypoint node pepr:dev -e "const fs=require('fs'); const p='node_modules/kubernetes-fluent-client/package.json'; const j=JSON.parse(fs.readFileSync(p,'utf8')); console.log(j.name+'@'+j.version);"
@cmwylie19
cmwylie19 / DEBUGGING_UDS_CORE.md
Created January 6, 2026 18:15
running npx pepr dev
npm run build # in pepr
rm -rf node_modules/pepr/src node_modules/pepr/dist
cp -r ~/pepr/src node_modules/pepr/src ~/pepr/dist node_modules/pepr/dist # in uds-core
node node_modules/pepr/dist/cli.js dev --yes # in uds-core
@cmwylie19
cmwylie19 / issue_creator.sh
Created October 27, 2025 21:04
create issues under epic
#!/usr/bin/env bash
set -euo pipefail
# ========= Config =========
REPO="defenseunicorns/uds-compliance"
SUBISSUE_PARENT=545 # Parent issue to attach sub-issues to
LABEL="Lula2" # Label to apply to created issues
DRY_RUN="${DRY_RUN:-1}" # Override with: DRY_RUN=0 bash issue_creator.sh
# ==========================
@cmwylie19
cmwylie19 / DEBUGGING.md
Last active January 15, 2026 15:52
uds-core
npm i --no-save pepr-0.0.0-development.tgz 
PEPR_CUSTOM_IMAGE="pepr:dev" uds run slim-dev
uds run slim-dev && k3d image import pepr:dev -c uds;
k label ns pepr-system zarf.dev/agent=ignore && \
k set image deploy/pepr-uds-core-watcher -n pepr-system watcher=pepr:dev && \
k set image deploy/pepr-uds-core -n pepr-system server=pepr:dev && \
uds run test:single-layer --set=layer=metrics-server && \
uds run test:single-layer --set=layer=monitoring 
@cmwylie19
cmwylie19 / k.md
Created June 10, 2025 17:18
kubectl run
k run --rm -i --image=nginx curler -n pepr-system -- curl -k https://pepr-uds-core/metrics 
@cmwylie19
cmwylie19 / ORAS_Pepr.md
Last active October 21, 2025 18:17
demo pushing Pepr artifacts to an oras registry, crane, oras

Run a local zot registry

docker run --platform linux/amd64 -d -p 3333:5000 --name oras-quickstart ghcr.io/project-zot/zot-linux-amd64:latest

Build Pepr image and library

npm run build:image