Umbrella: BrewFormula CRD + controller that runs Linuxbrew on k3s #1

Closed
opened 2026-05-23 20:54:42 +00:00 by coilysiren · 0 comments
Owner

Originally filed by @coilysiren on 2026-05-15T01:48:15Z - https://github.com/coilysiren/linuxbrew-operator/issues/1

Premise

A Kubernetes operator that reconciles BrewFormula custom resources by running Linuxbrew. The CRD lets a user declare spec.tap, spec.formula, spec.version, spec.installTarget. The controller does the work.

Why this exists

personal-dashboard#63 sketched this as a joke shape. Turns out the niche is genuinely empty (verified 2026-05-14: no existing project, kbrew is unrelated). Worth being first.

v1alpha1 spec shape

apiVersion: brew.coilysiren.me/v1alpha1
kind: BrewFormula
metadata:
  name: personal-dashboard
spec:
  tap: coilysiren/tap
  formula: personal-dashboard
  version: latest            # or pinned
  installTarget: pod         # pod | host
status:
  installedVersion: "1.2.3"
  phase: Pending | Installing | Ready | Failed
  lastInstalledAt: "..."
  message: ""

Install targets

  1. installTarget: pod (ship first) - controller spawns ephemeral Job using homebrew/brew image, brew-installs into PVC, then creates a Deployment that mounts the PVC and runs the binary. Clean, reproducible, no host privileges.
  2. installTarget: host (phase 2) - controller drives a privileged DaemonSet that runs brew install against the node's Linuxbrew prefix and emits a systemd unit. The original joke shape from #63.

Stack

  • Go + Kubebuilder scaffold.
  • Helm chart in chart/ deploys CRD + controller + RBAC.
  • Repo: coilysiren/linuxbrew-operator.
  • Naming dodge: kbrew is taken for an unrelated CLI. linuxbrew-operator is specific.

First consumer

personal-dashboard. Wire it up via a BrewFormula CR once the operator can reconcile one end-to-end.

Out of scope for v1alpha1

  • Webhooks (admission validation).
  • Multi-tenancy / namespace scoping beyond the default.
  • Brew tap auth (private taps).
_Originally filed by @coilysiren on 2026-05-15T01:48:15Z - [https://github.com/coilysiren/linuxbrew-operator/issues/1](https://github.com/coilysiren/linuxbrew-operator/issues/1)_ **Premise** A Kubernetes operator that reconciles `BrewFormula` custom resources by running Linuxbrew. The CRD lets a user declare `spec.tap`, `spec.formula`, `spec.version`, `spec.installTarget`. The controller does the work. **Why this exists** [personal-dashboard#63](https://github.com/coilysiren/personal-dashboard/issues/63) sketched this as a joke shape. Turns out the niche is genuinely empty (verified 2026-05-14: no existing project, kbrew is unrelated). Worth being first. **v1alpha1 spec shape** ```yaml apiVersion: brew.coilysiren.me/v1alpha1 kind: BrewFormula metadata: name: personal-dashboard spec: tap: coilysiren/tap formula: personal-dashboard version: latest # or pinned installTarget: pod # pod | host status: installedVersion: "1.2.3" phase: Pending | Installing | Ready | Failed lastInstalledAt: "..." message: "" ``` **Install targets** 1. `installTarget: pod` (ship first) - controller spawns ephemeral Job using `homebrew/brew` image, brew-installs into PVC, then creates a Deployment that mounts the PVC and runs the binary. Clean, reproducible, no host privileges. 2. `installTarget: host` (phase 2) - controller drives a privileged DaemonSet that runs `brew install` against the node's Linuxbrew prefix and emits a systemd unit. The original joke shape from #63. **Stack** - Go + Kubebuilder scaffold. - Helm chart in `chart/` deploys CRD + controller + RBAC. - Repo: `coilysiren/linuxbrew-operator`. - Naming dodge: `kbrew` is taken for an unrelated CLI. `linuxbrew-operator` is specific. **First consumer** personal-dashboard. Wire it up via a `BrewFormula` CR once the operator can reconcile one end-to-end. **Out of scope for v1alpha1** - Webhooks (admission validation). - Multi-tenancy / namespace scoping beyond the default. - Brew tap auth (private taps).
Commenting is not possible because the repository is archived.
No labels
P4
No milestone
No project
No assignees
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
coilysiren/linuxbrew-operator#1
No description provided.