fix: reuse Authentik API transport across reconciliations #13
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
homelab/authentik-operator!13
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/fe2472f2-reuse-http-transport"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Repeated Authentik client reconciliations leak idle HTTP connections.
NewClient(..., true, ...)creates a fresh transport on every call, with no idle timeout. Its idle connection goroutines keep the transport alive after the API client is unreachable. The live 0.3.0 operator climbs from about 30Mi to its 128Mi limit in roughly an hour and OOMs repeatedly.Keep URLs and authorization headers on each SDK client; preserve the explicit TLS mode. Correct the stale README release instructions to match the existing tag-only release runbook/workflow.
Evidence
HealthCheckinterface retained 100 connections and about 300 goroutines after 100 fresh clients and forced GC. Default-client control retained one connection; explicitly closing each client's idle connections retained zero. The new reuse regression failed on the original implementation (100 accepted connections, expected at most two).-racepasses.task ci:qualitypasses locally: release safety tests, controller/envtest tests, lint, manager build, e2e compile, chart lint/render and generated manifest parity.Merge danger
Door: two-way for source. Revert restores per-reconcile transport allocation and the leak. A separately approved version tag and published artifacts are lasting.
Blast radius: app. No permission, access policy, image source, credential, server version or TLS-verification change. HTTP pool reuse changes connection lifetime; per-client credentials and error responses are regression-tested.
Rollback and verification