···8899# Materialized helm subchart deps (regenerated by helmfile)
1010k8s/charts/*/charts/
1111+1212+# Bun deps for scripts/ (regenerated by `bun install`)
1313+scripts/node_modules/
+15-51
.justfile
···2828# Update caddy-tailscale plugin to latest commit (also refreshes hash if stale).
2929[group('flake')]
3030update-caddy-tailscale:
3131- #!/usr/bin/env bash
3232- set -euo pipefail
3333- CADDY_FILE="nix/modules/nixos/services/caddy/default.nix"
3434- RESPONSE=$(curl -sf "https://api.github.com/repos/tailscale/caddy-tailscale/commits?per_page=1")
3535- SHA=$(echo "$RESPONSE" | grep -m1 '"sha"' | sed 's/.*"sha": *"//;s/".*//')
3636- SHA12=${SHA:0:12}
3737- COMMITTER_DATE=$(echo "$RESPONSE" | sed -n '/"committer": {/{n;n;n;s/.*"date": *"//;s/".*//;p;q;}')
3838- TIMESTAMP=$(echo "$COMMITTER_DATE" | sed 's/[-T:]//g;s/Z//')
3939- NEW_VERSION="v0.0.0-${TIMESTAMP}-${SHA12}"
4040- OLD_VERSION=$(grep -o 'caddy-tailscale@[^"]*' "$CADDY_FILE" | sed 's/caddy-tailscale@//')
4141- VERSION_CHANGED=false
4242- if [ "$OLD_VERSION" != "$NEW_VERSION" ]; then
4343- VERSION_CHANGED=true
4444- echo "Updating caddy-tailscale: $OLD_VERSION -> $NEW_VERSION"
4545- sed -i "s|caddy-tailscale@[^\"]*|caddy-tailscale@${NEW_VERSION}|" "$CADDY_FILE"
4646- else
4747- echo "caddy-tailscale already at latest: $NEW_VERSION"
4848- fi
4949- # Always try building with the current hash first; rehash if it fails.
5050- if nix build .#nixosConfigurations.celestic.config.services.caddy.package 2>/dev/null; then
5151- if [ "$VERSION_CHANGED" = true ]; then
5252- git add "$CADDY_FILE"
5353- git commit -m "caddy: update caddy-tailscale to $NEW_VERSION"
5454- echo "Done! caddy-tailscale updated to $NEW_VERSION"
5555- else
5656- echo "Already up to date."
5757- fi
5858- exit 0
5959- fi
6060- echo "Hash is stale, determining new hash..."
6161- sed -i 's|hash = "sha256-[^"]*"|hash = ""|' "$CADDY_FILE"
6262- BUILD_OUTPUT=$(nix build .#nixosConfigurations.celestic.config.services.caddy.package 2>&1 || true)
6363- NEW_HASH=$(echo "$BUILD_OUTPUT" | sed -n 's/.*got: *//p' | tr -d ' ')
6464- if [ -z "$NEW_HASH" ]; then
6565- echo "Error: could not determine hash from build output."
6666- echo "$BUILD_OUTPUT"
6767- exit 1
6868- fi
6969- sed -i "s|hash = \"\"|hash = \"${NEW_HASH}\"|" "$CADDY_FILE"
7070- echo "Updated hash: $NEW_HASH"
7171- echo "Verifying build..."
7272- nix build .#nixosConfigurations.celestic.config.services.caddy.package
7373- git add "$CADDY_FILE"
7474- if [ "$VERSION_CHANGED" = true ]; then
7575- git commit -m "caddy: update caddy-tailscale to $NEW_VERSION"
7676- else
7777- git commit -m "caddy: update caddy-tailscale hash to $NEW_HASH"
7878- fi
7979- echo "Done!"
3131+ bun scripts/update-caddy-tailscale.ts
80328133############################################################################
8234#
···190142#
191143############################################################################
192144145145+# Run all consistency + flake checks.
146146+[group('kubes')]
147147+check:
148148+ bun scripts/check.ts
149149+ nix flake check --impure
150150+151151+# Bump a digest-pinned chart image to its current upstream digest.
152152+# Usage: just bump <chart> | just bump --all | just bump --check
153153+[group('kubes')]
154154+bump TARGET:
155155+ bun scripts/bump-image.ts {{ TARGET }}
156156+193157# Scaffold a new app chart under k8s/charts/<name>. After running, edit the
194158# values.yaml and add a release block to k8s/helmfile.yaml. See k8s/charts/README.md.
195159[group('kubes')]
···220184221185 image:
222186 repository: TODO
223223- tag: latest
224224- pullPolicy: Always
187187+ tag: TODO@sha256:TODO
188188+ pullPolicy: IfNotPresent
225189226190 resources:
227191 requests: { cpu: 50m, memory: 64Mi }
···4455image:
66 repository: codeberg.org/forgejo/forgejo
77- tag: "15"
88- # Stops a registry hiccup at pod-restart time from wedging the deployment
99- # (codeberg has had 502s). Tradeoff: bumping tag is the only way to update.
77+ tag: 15@sha256:db04c7114b656f896e206ba3873fe8d3a7adf2daa44907037f0274f4ba653fb9
108 pullPolicy: IfNotPresent
1191210resources:
···11-# Keep helm release history small. Each revision is stored as a Secret
22-# containing gzip+base64 of all rendered manifests; CRD-bundling charts
33-# (cert-manager, traefik, cnpg) make each revision ~1MB, so the default 10
44-# means ~10MB per release and helm's pre-upgrade LIST query stalls the
55-# apiserver's HTTP/2 stream over the tailnet.
11+# Low history; CRD-heavy charts (cert-manager, traefik, cnpg) push each
22+# revision Secret to ~1MB, and the default of 10 stalls the apiserver.
63helmDefaults:
74 historyMax: 3
85
+2
nix/modules/flake/devShells.nix
···2121 (lib.hiPrio uutils-coreutils-noprefix)
2222 age
2323 ansibleWithK8s
2424+ bun
2425 git
2526 helmfile
2627 just
2728 kubectl
2829 kubernetes-helm
2930 nh
3131+ skopeo
3032 sops
3133 ssh-to-age
3234 terraform