MoreRSS

site icon Ellie HuxtableModify

A software/infrastructure engineer. Maker of Atuin. Previously, lead the infrastructure team at PostHog, worked at Coinbase, Tracr and Arachnys.
Please copy the RSS to your reader, or quickly subscribe to:

Inoreader Feedly Follow Feedbin Local Reader

Rss preview of Blog of Ellie Huxtable

Spegel for p2p docker registries in k3s

2026-02-16 08:00:00

spegel

I was recently setting up a new k3s cluster for running Atuin. Since I wrote my last note on the subject, a few things have changed!

I definitely need to do a v2 of my post, but in the meantime I learned a bit about Spegel, an optional integrated registry included with k3s.

If server nodes are started with --embedded-registry, then they will setup + run a Spegel registry. This means they host a local OCI registry on port 6443, while connecting to a p2p network over port 5001.

In order for upstream registry mirroring to work, you must edit /etc/rancher/k3s/registries.yaml

For example

mirrors:
  docker.io:
  registry.k8s.io:

enables mirroring of those two registries. This file is read at startup. You can enable wildcard mirroring with "*":, quoted required.

The p2p routing works in a very similar way to BitTorrent - Spegel also uses a Kademlia DHT for resolving digests.

gif sourced from the spegel readme

1290

2025-11-06 08:00:00

Ellie's 1290 Superduke R Evo

I moved to the US and bought a superduke yay

Here I am making some notes. I will likely also track torque specs, services, etc.

Specs

A collection of useful specs

Spec Value
Factory recommended rear pressure 42
Factory recommended front pressure 36
Ellie's preferred rear pressure 36
Ellie's preferred front pressure 32

Torque specs

I'll note them down as I look them up

Part Torque (nm)
Rear wheel nut 250

Bolt sizes

Fixing ingress-nginx ConfigurationSnippet validations

2025-01-03 08:00:00

Today I found myself needing to configure ingress-nginx. I needed to write a bit of nginx config to rewrite status codes for certain routes.

Something like

nginx.ingress.kubernetes.io/configuration-snippet: |-
    location /metrics {
	    return 404;
    }

I've done this many times in the past, but today I received the following error

Error: UPGRADE FAILED: cannot patch "xyz" with kind Ingress: admission webhook "validate.nginx.ingress.kubernetes.io" denied the request: annotation group ConfigurationSnippet contains risky annotation based on ingress configuration

I already had

allowSnippetAnnotations: true

set, so this was confusing!

It turns out, in a recent release (controller 1.12), annotations are flagged by risk. There's a table here

You now need to specify

annotations-risk-level: Critical

in the configmap. If you're using the helm chart, it can be added like so

controller:
  config:
    annotations-risk-level: Critical

Note that this change is a reaction to a security issue. This is mostly an issue if you're using a multi-tenant cluster.

Issues: https://github.com/kubernetes/ingress-nginx/issues/12618, https://github.com/kubernetes/kubernetes/issues/126811

Fixing drag events with Tauri

2024-09-13 08:00:00

I've been working on a desktop app with Tauri, and had issues for a while with the "draggable" prop on some elements. Instead of them dragging as I expected, I'd just get a plus icon.

The fix was pretty easy

I added

app: {
	window:[{
		...snip,
		"dragDropEnabled": false
	}]
}

to my tauri.config.json.

This is mentioned in the Tauri docs: https://v2.tauri.app/reference/javascript/api/namespacewebview/#properties-1

Amending the author of a Git commit

2024-07-30 08:00:00

It's pretty common that I'll accidentally use the wrong email for a commit. I have a few emails that I like to use for different purposes, so getting it correct is important :)

Amend author of last commit

This one is nice and easy!

git commit --amend --author="Example Name <[email protected]>"

Using interactive rebase

  1. git rebase -i on whatever base you want
  2. Mark the commits you'd like to change with edit, instead of pick
  3. git commit --amend --author="Example Name <[email protected]>", then git rebase --continue

Using filter branch

Filter the whole thing! Be careful though, filter-branch can break things if you're not careful

git filter-branch -f --commit-filter '
      if [ "$GIT_AUTHOR_EMAIL" = "[email protected]" ];
      then
              GIT_AUTHOR_NAME="New Name";
              GIT_AUTHOR_EMAIL="[email protected]";
              git commit-tree "$@";
      else
              git commit-tree "$@";
      fi' HEAD

Using filter repo

I first mentioned git-filter-repo in split git repo, but it's useful here too. Preferable to filter-branch, but not included in the base git install.

Install with

curl "https://raw.githubusercontent.com/newren/git-filter-repo/main/git-filter-repo" -o ~/.local/bin/git-filter-path

Then do either of the following

With mailmap

If you setup your mailmap to map old -> new, you can run

git filter-repo --use-mailmap

Without mailmap

Otherwise, the following works well

git filter-repo --email-callback '
    return email if email != b"[email protected]" else b"[email protected]"
    '

How to split a Git subdirectory into a new repo

2024-07-29 08:00:00

First, install git-filter-repo. This is a python script, with no dependencies.

It's easy to install. Just drop the script somewhere in your PATH. For me:

curl "https://raw.githubusercontent.com/newren/git-filter-repo/main/git-filter-repo" -o ~/.local/bin/git-filter-path

An important thing to note is that git-filter-repo will replace all other files in the repo with those in the subdir. You should operate on a fresh copy of your repo to avoid losing data.

Let's imagine our repo looks like the following

🦄 ls -l
.rw-r--r-- ellie staff  0 B Mon Jul 29 14:13:39 2024 LICENSE
.rw-r--r-- ellie staff  0 B Mon Jul 29 14:13:34 2024 README.md
drwxr-xr-x ellie staff 64 B Mon Jul 29 14:13:35 2024 src/
drwxr-xr-x ellie staff 64 B Mon Jul 29 14:13:43 2024 subdir/

And we'd like to turn the contents subdir into its own repository.

We would run

git filter-repo --subdirectory-filter subdir

Rewriting commit messages

I generally follow conventional commits, so I had a bunch of scoped commits like this

feat(subdir): do a thing

Now that subdir is its own repo, those commits felt a bit weird. Let's tidy them up!

git filter-repo --message-callback '
      return re.sub(b"\(subdir\)\n", b"", message, flags=re.MULTILINE)
      '