Add argocd namespace to Forgejo network policy #200
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#200
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Type
Bug
Lineage
Discovered during incident #184 investigation. #143 (pal-e-services, closed) already migrated ArgoCD apps to internal Forgejo URLs. This ticket completes the network policy gap left by that migration.
Repo
forgejo_admin/pal-e-platformWhat Broke
ArgoCD pods in the
argocdnamespace cannot reach Forgejo's internal service (forgejo-http.forgejo.svc.cluster.local:80) because the Forgejo network policy (default-deny-ingress) does not includeargocdin its ingress allow list.Current allow list:
tailscale,woodpecker,monitoring.Missing:
argocd.This causes ArgoCD sync failures (EOF/connection refused) and image updater tag query failures across all 9 apps.
Already done (not in scope):
repo_urlalready uses internal Forgejo URL (done in #143, pal-e-services)api_urlalready uses internal Harbor URL (pal-e-services)argocdnamespace (line 102)Repro Steps
curl http://forgejo-http.forgejo.svc.cluster.local/api/v1/version{"version":"14.0.2+gitea-1.22.0"}Expected Behavior
ArgoCD pods can reach Forgejo's internal service for git operations.
Environment
terraform/network-policies.tflines 34-56argocdargocdto the allow list fixes connectivity (tested via kubectl patch, now needs Terraform)File Targets
Files to modify:
terraform/network-policies.tf— addargocdnamespace to Forgejo ingress allow list (one rule, matching existing pattern)Files NOT to touch:
terraform/main.tf— ArgoCD apps are NOT here (they're in pal-e-services)pal-e-services/— already correctAcceptance Criteria
argocdnamespace in ingress allow list (in Terraform, not kubectl patch)tofu planshows only the network policy changeTest Expectations
tofu validatepassestofu plan -lock=falseshows network policy update onlykubectl get applications -n argocd -o custom-columns='NAME:.metadata.name,STATUS:.status.sync.status'shows Syncedtofu plan -lock=falseinterraform/Constraints
tofu planmust include-lock=falseChecklist
Related
project-pal-e-platformScope Review: NEEDS_REFINEMENT
Review note:
review-447-2026-03-26Ticket scope is ~90% already completed or targets the wrong repo. ArgoCD app
repo_urland image updaterapi_urlare already using internal URLs (done in #143, pal-e-services). The only valid remaining work in pal-e-platform is addingargocdnamespace to the Forgejo network policy interraform/network-policies.tf.terraform/main.tfdoes not contain ArgoCD Application resources or image updater config — those are inpal-e-servicesRecommend: retitle, reduce scope to netpol fix, update file targets and acceptance criteria, reference #143 in lineage.
Eliminate Tailscale hairpin — ArgoCD + image updater to internal service URLsto Add argocd namespace to Forgejo network policyScope Review: READY
Review note:
review-447-2026-03-26Re-review after issue rewrite. All 6 concerns from the initial NEEDS_REFINEMENT verdict have been addressed:
network-policies.tfonly, explicit "Files NOT to touch" sectionAll file targets verified against codebase. Forgejo netpol lines 34-56 confirmed: current allow list is tailscale, woodpecker, monitoring. Harbor netpol line 102 confirmed: already has argocd. Dependencies (#196, #197, #184, #143) all documented.
VERDICT: READY for next_up.