Skip to content

chore: lighter alpine/kubectl hook image + bump authn to 0.27.1 - #69

Merged
braghettos merged 2 commits into
mainfrom
chore/lighter-hook-image
Aug 13, 2026
Merged

chore: lighter alpine/kubectl hook image + bump authn to 0.27.1#69
braghettos merged 2 commits into
mainfrom
chore/lighter-hook-image

Conversation

@braghettos

@braghettos braghettos commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Two related hardening changes, released together as installer 0.3.35.

1. Lightweight hook image (fixes #66)

The installer's own hook Jobs (self-bootstrap waves + pre/post-delete teardown reapers) ran on alpine/k8s:1.31.0 (~250MB compressed / 822MB unpacked). On fresh multi-node clusters that pull blew the self-register/self-instance activeDeadlineSeconds: 300 budget and failed installs.

Every hook only runs kubectl in /bin/sh poll loops — no helm/jq/yq/kustomize (verified across all four files). Swapped to alpine/kubectl:1.36.3:

  • ~21MB compressed (~90% smaller pull) — comfortably inside the 300s deadline
  • busybox /bin/sh + sleep/grep; kubectl 1.36 matches the k8s ≥ 1.36 floor (was skewed at 1.31)
  • same alpine/ publisher family — unchanged trust boundary (the official registry.k8s.io/kubectl is distroless/no-shell, so it can't run the hooks' sleep loops)
  • DRY via a pure inst.hookImage template constant — not a values key, so no values.schema.json / crdgen CRD / composition-CR coupling (fix(schema): allow components[].resources so the Installer CR validates (regression from #65) #68-safe)

2. Bump authn + authn-crd 0.27.0 → 0.27.1

Ships authn's hardened securityContext defaults (krateo-platformops/authn#21): pod + container run non-root, read-only rootfs, drop ALL caps, seccomp RuntimeDefault. Pod-security hardening only — no CR/behaviour change.

Verification

  • helm template renders alpine/kubectl:1.36.3 for every hook Job in both bootstrap + composition mode; zero alpine/k8s remain
  • image confirmed to carry /bin/sh, kubectl v1.36.3, sleep, grep

🤖 Generated with Claude Code

https://claude.ai/code/session_01LJsLqtryCgWwEt8FnPE1se

braghettos and others added 2 commits August 13, 2026 23:15
The installer's own hook Jobs (self-bootstrap waves + pre/post-delete teardown
reapers) ran on alpine/k8s:1.31.0 (~250MB compressed / 822MB unpacked). On fresh
multi-node clusters that pull blew the self-register/self-instance
activeDeadlineSeconds: 300 budget, failing the install (#66).

Every one of these hooks only runs `kubectl` inside `/bin/sh` poll loops — no helm,
jq, yq or kustomize (verified across all four hook files). So swap the fat all-tools
image for alpine/kubectl:1.36.3 (~21MB compressed, busybox shell): a ~90% smaller
pull that comfortably fits the deadline. Bumped kubectl 1.31 -> 1.36 to match the
installer's k8s>=1.36 floor (the old 1.31 was already skewed 5 minors).

DRY: the image is a pure template constant `inst.hookImage` in _helpers.tpl, NOT a
values key — so it never has to be threaded through values.schema.json / the crdgen'd
Installer CRD / the composition-mode CR (that class of coupling caused #68).

Verified: `helm template` renders alpine/kubectl:1.36.3 for all hook Jobs in both
bootstrap and composition mode; zero alpine/k8s references remain; image confirmed to
carry /bin/sh + kubectl + sleep/grep.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LJsLqtryCgWwEt8FnPE1se
Ship authn's hardened securityContext defaults (krateo-platformops/authn#21):
pod + container run non-root, read-only rootfs, drop ALL caps, seccomp RuntimeDefault.
crds-subchart tracks the same release tag (crd-publishing standard), so authn-crd
moves with it. No CR/behaviour change — pod-security hardening only.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LJsLqtryCgWwEt8FnPE1se
@braghettos braghettos changed the title chore(hooks): use lightweight alpine/kubectl for lifecycle hook Jobs chore: lighter alpine/kubectl hook image + bump authn to 0.27.1 Aug 13, 2026
@braghettos
braghettos merged commit b4977ae into main Aug 13, 2026
11 checks passed
@braghettos
braghettos deleted the chore/lighter-hook-image branch August 13, 2026 21:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

installer-self-register post-upgrade hook DeadlineExceeded under cluster CPU pressure (activeDeadlineSeconds: 300)

1 participant