fix: honor provider build tags in Dockerfile.standalone - #67
Merged
Conversation
go build -o external-secrets main.go had no -tags flag. Since v1.x, every provider registration lives behind a Go build constraint (pkg/register/<name>.go: //go:build <name> || all_providers, see AGENTS.md), so a bare go build compiles an empty pkg/register and zero providers register at runtime. Every ClusterSecretStore/SecretStore then fails reconciliation with: could not get provider client: failed to find registered store backend for type: vault, name: <store> Same root cause, same error shape as external-secrets#5807 (webhook provider, `make run` dev build), fixed there for the Makefile/ Tiltfile default in external-secrets#5851 - but that fix never touched Dockerfile.standalone, which still builds with no tags at all. Adds ARG PROVIDER=all_providers (matching the Makefile's own default) and passes it through as -tags, so a plain `docker build -f Dockerfile.standalone .` keeps working out of the box, while `--build-arg PROVIDER=vault` (or any other provider name) still lets you build a slimmer binary.
mkousteris
marked this pull request as ready for review
September 2, 2026 09:59
pmarav
approved these changes
Sep 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
workable-1.3.1's image was built via.github/workflows/ci.yml'spublish-artifactsjob, which usesdocker/build-push-actionwithfile: Dockerfile.standalone— a plaindocker build, not the Makefile-drivenDockerfile/Dockerfile.ubipath our CI never touches.Dockerfile.standaloneran:with no
-tagsflag at all.Since upstream's v1.x provider-separation refactor (design/007-provider-versioning-strategy.md), every provider's registration is gated behind a Go build constraint —
pkg/register/vault.go:(documented in
AGENTS.md: "Makefile honorsPROVIDER ?= all_providersand passes it asgo build -tags"). A barego buildwith no tags excludes every file inpkg/register, so nothing registers, and every store fails:{"level":"error","logger":"controllers.ClusterSecretStore","msg":"unable to validate store","error":"could not get provider client: failed to find registered store backend for type: vault, name: <store>"}Reproduced on
workablestg9-eksafter deploying this image — everyClusterSecretStoreshowsInvalidProviderConfig/Ready: Falsewith exactly this error, despite valid Vault config.Same root cause, same error shape as a real upstream bug: external-secrets/external-secrets#5807 (webhook provider missing from a
make rundev build), fixed upstream in external-secrets/external-secrets#5851 — but that fix only touchedMakefile/Tiltfile, neverDockerfile.standalone. This file's own header comment ("for building without external dependencies") confirms it's a real, intended build path — it just predates (or was missed by) the build-tag system and has carried this gap since.Fix
Add
ARG PROVIDER=all_providers(matching the Makefile's own default) and pass it through as-tags, so:docker build -f Dockerfile.standalone .keeps working exactly as before (all providers included, matching current expectations).--build-arg PROVIDER=vault(or any other provider name/list) builds a slimmer binary when that's wanted.Testing plan
--build-arg PROVIDER=vaultand confirmvaultbackend registers (controller starts,ClusterSecretStore/SecretStorereconcile toReady)--build-arg(default) and confirm behavior matches current default (all providers present)workable-1.3.1image build once merged, redeploy toworkablestg9-eks, confirmClusterSecretStoreresources goReady: TrueWorth reporting upstream?
This gap exists in
external-secrets/external-secrets's ownDockerfile.standalonetoo (unchanged from our fork, confirmed via diff at the same tag) — worth a matching upstream PR once verified here, since anyone building that file on v1.x+ hits the same issue.