Use cluster-internal registry with --insecure-pull for Kaniko #79
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "77-kaniko-insecure-pull"
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
build_argsfor cluster-internal registry AND adds--insecure-pullto force HTTP for base image pullsChanges
.woodpecker.yaml: Addbuild_args: "REGISTRY=harbor.harbor.svc.cluster.local"and--insecure-pulltoextra_optsTest Plan
Review Checklist
Related Notes
ldraney/landscaping-assistant #77— Kaniko build-arg override breaks base image pullldraney/landscaping-assistant #23— parent CI optimization issuelandscaping-assistant— project this work belongs toCloses #77
PR #79 Review
DOMAIN REVIEW
Tech stack: Woodpecker CI pipeline (
.woodpecker.yaml), Kaniko image builder, Dockerfile with multi-stage build usingARG REGISTRYfor base image resolution.Change analysis: The diff is a single-line modification in
.woodpecker.yamlline 51:The
build_argsline (line 50) is already present onmainper the current file -- the diff shows it as context, not a change. So the actual net change is adding--insecure-pulltoextra_opts.Correctness of the fix: The logic chain is sound:
build_args: "REGISTRY=harbor.harbor.svc.cluster.local"overrides the Dockerfile'sARG REGISTRY=harbor.tail5b443a.ts.netdefault, soFROMlines resolve toharbor.harbor.svc.cluster.local/library/ruby-rails-build:latestandruby-rails-runtime:latest.insecure: trueandinsecure-registrysettings handle the push side (Kaniko pushes to the registry over HTTP).FROMimage pulls from the cluster-internal address. Harbor's cluster service only exposes HTTP:80, so HTTPS times out and HTTP gets refused on port 80 after the HTTPS attempt fails differently than expected.--insecure-pulltells Kaniko to use HTTP for pulling base images. This correctly solves the pull-side protocol mismatch without touching the push path.Kaniko flag review:
--insecure-pullis a well-documented Kaniko flag that forces HTTP for image pulls. It is the correct flag for this scenario (distinct from--insecurewhich affects pushes, already handled by the plugin'sinsecure: truesetting).--skip-push-permission-check.Security consideration: Using HTTP for base image pulls is acceptable here because the traffic stays within the Kubernetes cluster (pod-to-service communication on the cluster network). There is no external network traversal. The Tailscale FQDN alternative (
harbor.tail5b443a.ts.net) would use HTTPS but routes through DERP relays which are unreliable for large layer transfers -- cluster-internal HTTP is the pragmatically correct choice.BLOCKERS
None.
This is a CI configuration change, not application code. The BLOCKER criteria (test coverage for new functionality, unvalidated user input, secrets in code, DRY violations in auth paths) do not apply. No new application logic is introduced. Secrets continue to use
from_secretreferences (lines 57-58).NITS
extra_optsexplaining why--insecure-pullis needed would help future maintainers understand the cluster-internal HTTP requirement. Something like# --insecure-pull: cluster-internal Harbor serves HTTP only. Not blocking.SOP COMPLIANCE
77-kaniko-insecure-pullfollows{issue-number}-{kebab-case-purpose}conventionfrom_secretreferencesCloses #77present in PR bodyPROCESS OBSERVATIONS
--insecure-pullto handle the protocol mismatch. The fix addresses both failure modes identified in the issue.mergeable: false-- this may indicate a merge conflict or branch state issue that should be resolved before merge.mainpush events after lint and test pass.VERDICT: APPROVED
2b0ad5a81ff15f8f7af8