Bug: NetworkPolicy field manager conflicts block tofu apply #152
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#152
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
standalone — discovered during pipeline failure investigation (session 2026-03-24)
Repo
forgejo_admin/pal-e-platformWhat Broke
All 9
kubernetes_manifestresources innetwork-policies.tflack afield_managerblock. When anyone runskubectl patchon a NetworkPolicy during an incident (which is normal incident response), field ownership transfers from Terraform tokubectl-patch. Subsequenttofu applyfails with:This blocks ALL merges to main until the conflict is manually resolved.
Repro Steps
kubectl patch netpol default-deny-ingress -n forgejo ...Expected Behavior
Terraform should reclaim field ownership on apply, overwriting manual patches. Manual patches during incidents are expected — they should be temporary and reconciled by the next apply, not permanent blockers.
Environment
netpol_forgejoAcceptance Criteria
kubernetes_manifestnetpol resources havefield_manager { force_conflicts = true }tofu validatepasseskubectl patchduring incidents no longer permanently breaks CIRelated
project-pal-e-platform— platform infrastructureforgejo_admin/pal-e-platform #109— platform cleanup meta-issuesop-network-security— NetworkPolicy management