feat: expose HARBOR_REGISTRY_INTERNAL to CI agents #159
No reviewers
Labels
No labels
domain:backend
domain:devops
domain:frontend
status:approved
status:in-progress
status:needs-fix
status:qa
type:bug
type:devops
type:feature
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
forgejo_admin/pal-e-platform!159
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "135-harbor-internal-url"
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
Adds
HARBOR_REGISTRY_INTERNALenvironment variable to the Woodpecker agent configuration so CI pipelines can push images via cluster-local DNS (harbor-core.harbor.svc.cluster.local) instead of the external Tailscale URL that routes through DERP relay.Changes
terraform/main.tf: AddedHARBOR_REGISTRY_INTERNAL = "harbor-core.harbor.svc.cluster.local"to the Woodpecker agentenvblockTest Plan
tofu fmt-- no formatting changes neededtofu validate-- passesHARBOR_REGISTRY_INTERNALin its environment$HARBOR_REGISTRY_INTERNALfor image push targetsReview Checklist
Related
Automated Review -- LGTM
Single-line addition, correctly placed in the Woodpecker agent
envblock. Value uses proper k8s internal service DNS. No secrets, no unnecessary changes.tofu fmtandtofu validateboth pass.PR #159 Review
DOMAIN REVIEW
Tech stack: OpenTofu / Helm provider / k8s (Woodpecker CI Helm chart values)
Hostname mismatch -- wrong Harbor service for image push
The env var sets
HARBOR_REGISTRY_INTERNAL = "harbor-core.harbor.svc.cluster.local". However,harbor-coreis the Harbor core API service. For Docker registry push operations (the stated purpose of this env var), the correct internal service is the Harbor nginx frontend:harbor.harbor.svc.cluster.local.Evidence from five pipelines that already use cluster-local push:
.woodpecker.yamlregistry fieldpal-e-appharbor.harbor.svc.cluster.localbasketball-apiharbor.harbor.svc.cluster.localpal-e-mailharbor.harbor.svc.cluster.localpal-e-docsharbor.harbor.svc.cluster.localwestside-appharbor.harbor.svc.cluster.localThe Blackbox health check at line 430 of
terraform/main.tfcorrectly usesharbor-core.harbor.svc.cluster.local:80/api/v2.0/healthbecause it is probing the API directly. But registry push traffic must go through the nginx service that handles v2 protocol routing.If pipelines use
$HARBOR_REGISTRY_INTERNALforkanikoordocker push, they will fail becauseharbor-coredoes not serve the Docker v2 registry API directly.Correct value:
harbor.harbor.svc.cluster.localHCL formatting: The alignment of
=signs is consistent with the existing block.tofu fmtcompliant. No issues.Scope: Single-line addition in the correct block (
agent.envwithin the Woodpecker Helm values). No unrelated changes. 1 file, 1 addition, 0 deletions.BLOCKERS
harbor-core.harbor.svc.cluster.localis the core API service, not the registry ingress. Must beharbor.harbor.svc.cluster.localto match the 5 pipelines that already use cluster-local push. This will cause push failures for any pipeline that references$HARBOR_REGISTRY_INTERNAL.NITS
tofu planoutput: PR conventions (CLAUDE.md) requiretofu planoutput for Terraform changes. The PR body hastofu fmtandtofu validatechecks but no plan output. Low risk for a single env var addition, but noted for process compliance.SOP COMPLIANCE
135-harbor-internal-urlreferences issue #135)Closes #135but no plan slug reference. Acceptable if this is standalone board work without a parent plan.PROCESS OBSERVATIONS
$HARBOR_REGISTRY_INTERNAL, causing push failures. The 5 pipelines that already hardcode the correct internal URL (harbor.harbor.svc.cluster.local) would not be affected, but the whole point of this env var is to give a canonical reference for migration.VERDICT: NOT APPROVED
One blocker: the internal hostname must be
harbor.harbor.svc.cluster.local(the nginx frontend that serves Docker v2 registry protocol), notharbor-core.harbor.svc.cluster.local(the core API service). Fix the value and this is ready to merge.PR #159 Review (Re-review)
DOMAIN REVIEW
Tech stack: OpenTofu / Helm provider / Kubernetes (Woodpecker CI agent configuration).
The change adds a single environment variable
HARBOR_REGISTRY_INTERNALto the Woodpecker agent Helm values. The valueharbor.harbor.svc.cluster.localis the Harbor nginx frontend service -- the correct endpoint for Docker push/pull within the cluster.Validation against existing usage:
pal-e-docs/.woodpecker.yamlline 54:registry: harbor.harbor.svc.cluster.local-- matchesbasketball-api/.woodpecker.yamlline 44:registry: harbor.harbor.svc.cluster.local-- matchesmcd-tracker-api/.woodpecker.yamlline 34: still uses external URLharbor.tail5b443a.ts.net-- a candidate to consume this new env varThe previous review flagged that
harbor-core.harbor.svc.cluster.localwas wrong for Docker push. The fix commit correctly changed it toharbor.harbor.svc.cluster.local. Note thatharbor-coreon line 430 is still correct in its own context -- that is the health check API endpoint, not the Docker registry frontend. These are distinct Harbor services.Formatting: The env var key alignment (padding with spaces) is consistent with the surrounding
WOODPECKER_BACKEND_*entries.tofu fmtcompliant.BLOCKERS
None.
NITS
Stale PR description: The Summary and Changes sections still reference
harbor-core.harbor.svc.cluster.localfrom the original commit, but the actual code now usesharbor.harbor.svc.cluster.local. Non-blocking, but the description should be updated to avoid confusion for anyone reading the PR history.No
tofu planoutput: The PR conventions in CLAUDE.md say to includetofu planoutput for Terraform changes. The Test Plan has checkboxes for post-apply verification but no plan output. Non-blocking for a single env var addition.SOP COMPLIANCE
135-harbor-internal-urlreferences issue #135)PROCESS OBSERVATIONS
This is a straightforward infrastructure fix that gives CI pipelines a stable env var for cluster-local Harbor access, avoiding DERP relay hairpin. The
mcd-tracker-apipipeline still hardcodes the external URL and could be migrated to use$HARBOR_REGISTRY_INTERNALin a follow-up.VERDICT: APPROVED