Compare commits

...
Sign in to create a new pull request.

3 commits

Author SHA1 Message Date
8876422d1f Fix detect job checkout for workflow_dispatch builds
The detect job was checking out main instead of the dispatched ref,
so it couldn't find build files that only exist on feature branches.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 13:23:45 -07:00
353a141181 Remove tag = "latest" from nix container definitions
The tag field in buildLayeredImage is optional and only affects the
local docker-archive output. The CI workflow tags with immutable
SHA-based tags via skopeo, so "latest" is misleading noise.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 13:19:23 -07:00
a1a97966cc Localize authentik-redis: nix-built container from nixpkgs
Replace upstream docker.io/library/redis:7-alpine with a nix-built
container using Redis 8.2.3 from nixpkgs. Introduces the attached
service pattern: parent field in service-versions.yaml, naming
convention (<parent>-<component>), and version assertion in default.nix
to prevent silent version drift on flake.lock updates.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 13:16:22 -07:00
9 changed files with 67 additions and 7 deletions

View file

@ -30,6 +30,7 @@ jobs:
- name: Checkout - name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with: with:
ref: ${{ inputs.ref || github.sha }}
fetch-depth: 2 fetch-depth: 2
- name: Detect and classify changed containers - name: Detect and classify changed containers

View file

@ -15,4 +15,5 @@ images:
- name: registry.ops.eblu.me/blumeops/authentik - name: registry.ops.eblu.me/blumeops/authentik
newTag: v2026.2.0-2d4098e-nix newTag: v2026.2.0-2d4098e-nix
- name: docker.io/library/redis - name: docker.io/library/redis
newName: registry.ops.eblu.me/blumeops/authentik-redis
newTag: 7-alpine newTag: 7-alpine

View file

@ -116,8 +116,6 @@ in
pkgs.dockerTools.buildLayeredImage { pkgs.dockerTools.buildLayeredImage {
name = "blumeops/alloy"; name = "blumeops/alloy";
tag = "latest";
contents = [ contents = [
alloy alloy
pkgs.cacert pkgs.cacert

View file

@ -0,0 +1,29 @@
# Nix-built Redis for Authentik
# Attached service: cache/broker (sessions, Celery task queue, caching)
# Uses Redis from nixpkgs, packaged with dockerTools.buildLayeredImage
#
# The version assertion ensures nix-build fails if a flake.lock update
# changes the Redis version — forcing an explicit version acknowledgment
# here and in service-versions.yaml (enforced by container-version-check).
{ pkgs ? import <nixpkgs> { } }:
let
version = "8.2.3";
in
assert pkgs.redis.version == version;
pkgs.dockerTools.buildLayeredImage {
name = "blumeops/authentik-redis";
contents = [
pkgs.redis
];
config = {
Entrypoint = [ "${pkgs.redis}/bin/redis-server" ];
Cmd = [ "--protected-mode" "no" ];
ExposedPorts = {
"6379/tcp" = { };
};
};
}

View file

@ -41,8 +41,6 @@ in
pkgs.dockerTools.buildLayeredImage { pkgs.dockerTools.buildLayeredImage {
name = "blumeops/authentik"; name = "blumeops/authentik";
tag = "latest";
contents = [ contents = [
ak ak
authentik-django authentik-django

View file

@ -67,8 +67,6 @@ in
pkgs.dockerTools.buildLayeredImage { pkgs.dockerTools.buildLayeredImage {
name = "blumeops/ntfy"; name = "blumeops/ntfy";
tag = "latest";
contents = [ contents = [
ntfy ntfy
pkgs.cacert pkgs.cacert

View file

@ -0,0 +1 @@
Localize authentik-redis container: replace upstream `redis:7-alpine` with nix-built image from nixpkgs (Redis 8.2.3). Introduces attached service pattern with `parent` field in service-versions.yaml and version assertion in default.nix to prevent silent version drift.

View file

@ -1,6 +1,6 @@
--- ---
title: Review Services title: Review Services
modified: 2026-02-19 modified: 2026-03-24
last-reviewed: 2026-03-07 last-reviewed: 2026-03-07
tags: tags:
- how-to - how-to
@ -59,6 +59,29 @@ mise run service-review --type hybrid
2. Review the Nix derivation or flake input for version pins 2. Review the Nix derivation or flake input for version pins
3. If upgrading, update and deploy via `mise run provision-ringtail` 3. If upgrading, update and deploy via `mise run provision-ringtail`
## Attached Services
Some services have auxiliary dependencies that run as separate containers — caches, sidecars, init helpers. These are tracked as **attached services** with a naming convention and an optional `parent` field:
```yaml
- name: authentik-redis
type: argocd
parent: authentik
current-version: "8.2.3"
upstream-source: https://github.com/redis/redis/releases
notes: >-
Attached service: Redis cache/broker for Authentik.
```
**Conventions:**
- **Naming:** `<parent>-<component>` (e.g., `authentik-redis`, `grafana-sidecar`)
- **`parent` field:** points to the parent service entry. Currently informational — the review task doesn't use it yet, but it enables future grouping/dependency-aware reviews.
- **`notes` field:** always starts with "Attached service:" to make the relationship clear at a glance.
- **Version tracking:** attached services that use nixpkgs packages should include a version assertion in `default.nix` (`assert pkgs.<pkg>.version == version;`) so that `flake.lock` updates that change the package version break the build and force explicit acknowledgment.
Existing attached services: `grafana-sidecar`, `authentik-redis`.
## Version Tracking Convention ## Version Tracking Convention
The `current-version` field in `service-versions.yaml` tracks the **upstream application version**, not the container image tag. For services with custom-built containers, the container image tag (e.g., `v1.0.0`) is decoupled from the contained app version (e.g., `v1.10.1`). This allows container rebuilds (base image updates, build fixes) without implying an upstream version change. The `current-version` field in `service-versions.yaml` tracks the **upstream application version**, not the container image tag. For services with custom-built containers, the container image tag (e.g., `v1.0.0`) is decoupled from the contained app version (e.g., `v1.10.1`). This allows container rebuilds (base image updates, build fixes) without implying an upstream version change.

View file

@ -104,6 +104,7 @@ services:
- name: grafana-sidecar - name: grafana-sidecar
type: argocd type: argocd
parent: grafana
last-reviewed: "2026-03-03" last-reviewed: "2026-03-03"
current-version: "1.28.0" current-version: "1.28.0"
upstream-source: https://github.com/kiwigrid/k8s-sidecar/releases upstream-source: https://github.com/kiwigrid/k8s-sidecar/releases
@ -157,6 +158,16 @@ services:
current-version: "2026.2.0" current-version: "2026.2.0"
upstream-source: https://github.com/goauthentik/authentik/releases upstream-source: https://github.com/goauthentik/authentik/releases
- name: authentik-redis
type: argocd
parent: authentik
last-reviewed: "2026-03-24"
current-version: "8.2.3"
upstream-source: https://github.com/redis/redis/releases
notes: >-
Attached service: Redis cache/broker for Authentik (sessions, Celery task
queue, caching). Nix-built container from nixpkgs with version assertion.
- name: ollama - name: ollama
type: argocd type: argocd
last-reviewed: "2026-03-02" last-reviewed: "2026-03-02"