Localize external-secrets on ringtail (amd64 nix build) #368
4 changed files with 74 additions and 1 deletions
Localize external-secrets for ringtail (amd64) via nix build
container.py builds arm64 (indri/Dagger); add default.nix to build the amd64 image on ringtail's nix-container-builder (Go 1.26, -tags all_providers). external-secrets-ringtail now uses a thin overlay over the shared manifest, overriding only the image to the -nix tag. Repoints the app at the overlay. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
commit
59dace8b1a
|
|
@ -15,7 +15,7 @@ spec:
|
||||||
source:
|
source:
|
||||||
repoURL: ssh://forgejo@forge.ops.eblu.me:2222/eblume/blumeops.git
|
repoURL: ssh://forgejo@forge.ops.eblu.me:2222/eblume/blumeops.git
|
||||||
targetRevision: main
|
targetRevision: main
|
||||||
path: argocd/manifests/external-secrets
|
path: argocd/manifests/external-secrets-ringtail
|
||||||
destination:
|
destination:
|
||||||
server: https://ringtail.tail8d86e.ts.net:6443
|
server: https://ringtail.tail8d86e.ts.net:6443
|
||||||
namespace: external-secrets
|
namespace: external-secrets
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,16 @@
|
||||||
|
# Ringtail (amd64) overlay for external-secrets.
|
||||||
|
#
|
||||||
|
# Reuses the shared indri manifest as a base and only overrides the controller
|
||||||
|
# image to the nix-built amd64 variant (`-nix` tag). The base sets the arm64
|
||||||
|
# image (built via containers/external-secrets/container.py on indri's Dagger
|
||||||
|
# runner); ringtail's k3s is amd64 and needs the image built by
|
||||||
|
# containers/external-secrets/default.nix on the nix-container-builder.
|
||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
|
||||||
|
resources:
|
||||||
|
- ../external-secrets
|
||||||
|
|
||||||
|
images:
|
||||||
|
- name: registry.ops.eblu.me/blumeops/external-secrets
|
||||||
|
newTag: PLACEHOLDER-set-after-build
|
||||||
56
containers/external-secrets/default.nix
Normal file
56
containers/external-secrets/default.nix
Normal file
|
|
@ -0,0 +1,56 @@
|
||||||
|
# Nix-built External Secrets Operator (amd64, for ringtail k3s).
|
||||||
|
# Builds v2.2.0 from the forge mirror with all secret providers compiled in,
|
||||||
|
# faithful to upstream's `make build` (-tags all_providers). The container.py
|
||||||
|
# sibling builds the arm64 image for indri's minikube; this default.nix builds
|
||||||
|
# the amd64 image on ringtail's nix-container-builder.
|
||||||
|
{ pkgs ? import <nixpkgs> { } }:
|
||||||
|
|
||||||
|
let
|
||||||
|
version = "2.2.0";
|
||||||
|
|
||||||
|
src = pkgs.fetchgit {
|
||||||
|
url = "https://forge.ops.eblu.me/mirrors/external-secrets.git";
|
||||||
|
rev = "v${version}";
|
||||||
|
hash = "sha256-eAocOAp5s4CFRrpKfQr2lf3Ji+6nQQ1A5/eTw5B7v9U=";
|
||||||
|
};
|
||||||
|
|
||||||
|
# external-secrets v2.2.0 requires Go >= 1.26.1; nixpkgs default go is 1.25.x.
|
||||||
|
external-secrets = (pkgs.buildGoModule.override { go = pkgs.go_1_26; }) {
|
||||||
|
inherit src version;
|
||||||
|
pname = "external-secrets";
|
||||||
|
vendorHash = "sha256-0xuBK3fjAplPLAElHvKB6d+2lDz+De/s91fV4dPZwjE=";
|
||||||
|
|
||||||
|
doCheck = false;
|
||||||
|
|
||||||
|
subPackages = [ "." ];
|
||||||
|
|
||||||
|
tags = [ "all_providers" ];
|
||||||
|
|
||||||
|
ldflags = [ "-s" "-w" ];
|
||||||
|
|
||||||
|
meta = with pkgs.lib; {
|
||||||
|
description = "Kubernetes operator that integrates external secret management systems";
|
||||||
|
homepage = "https://github.com/external-secrets/external-secrets";
|
||||||
|
license = licenses.asl20;
|
||||||
|
mainProgram = "external-secrets";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
in
|
||||||
|
|
||||||
|
pkgs.dockerTools.buildLayeredImage {
|
||||||
|
name = "blumeops/external-secrets";
|
||||||
|
contents = [
|
||||||
|
external-secrets
|
||||||
|
pkgs.cacert
|
||||||
|
pkgs.tzdata
|
||||||
|
];
|
||||||
|
|
||||||
|
config = {
|
||||||
|
Entrypoint = [ "${external-secrets}/bin/external-secrets" ];
|
||||||
|
Env = [
|
||||||
|
"SSL_CERT_FILE=${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt"
|
||||||
|
"TZDIR=${pkgs.tzdata}/share/zoneinfo"
|
||||||
|
];
|
||||||
|
User = "65534";
|
||||||
|
};
|
||||||
|
}
|
||||||
1
docs/changelog.d/external-secrets-ringtail-nix.infra.md
Normal file
1
docs/changelog.d/external-secrets-ringtail-nix.infra.md
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
Completed the external-secrets localization for the ringtail (amd64) cluster. The indri Dagger build (`container.py`) only produces an arm64 image; added `containers/external-secrets/default.nix` to build the amd64 variant on ringtail's nix-container-builder, and gave `external-secrets-ringtail` a thin kustomize overlay that reuses the shared manifest and points at the `-nix` image. Both clusters now run the locally-built external-secrets binary on their native architecture.
|
||||||
Loading…
Add table
Add a link
Reference in a new issue