Repository navigation
Description
Problem
Split from #913 (key question 3). devops k8s deploy-stack applies neither the argocd nor the otel perimeter, and neither can be applied safely as written. #913's guard test (test_every_network_policy_has_a_deploy_stack_path_or_an_owned_exemption, tests/test_k8s_network_policies.py) exempts both under this issue.
k8s/argocd/networkpolicy.yaml (argocd-default-perimeter)
- Nothing applies it. Argo CD is an
infraHelm release (_HELM_RELEASES_BY_STACK["infra"]), deploy-stack names neither the file nork8s/argocd/kustomization.yaml, and no Argo CD Application syncsk8s/argocd. - Its API-server egress (rule 3,
:52-66) has only namespaceSelector peers (default,kube-system) on 443, 6443 and 8443. Those never match the node address that thekubernetesService resolves to. fix(k8s): pod logs reach loki once and labelled, with alloy as the only shipper (remove fluent-bit) #548 found the same defect in the logging policy, and fix(k8s): restore kubernetes cpu metrics and align monitoring dashboards to homelab-k3s #737 fixed monitoring's with anipBlockpeer. TheipBlockrule (:67-81) does not include 6443. Applied unchanged, the policy cuts Argo CD off from the API server and GitOps sync stops. - Ingress rule 2 (
:17-25) admits onlyipBlock: 0.0.0.0/0, on 8080 and 443. It has no Traefik peer, althoughargocd-ingressroutes Traefik toargocd-server(k8s/ingress/ingress-routes.yaml:389) and the server is a NodePort (k8s/argocd/values.yaml:30). kube-router matches ingress CIDRs against pod addresses (fix(k8s): monitoring ingress admits 0.0.0.0/0, qdrant ignores its security context, and single-ollama leftovers remain #953), so once applied the rule admits every pod in the cluster.
k8s/otel/networkpolicy.yaml (otel-default-perimeter)
- Since feat(k8s): argo cd keeps the homelab cluster at the current release branch, with automated sync, prune and self-heal that never delete data #755, Argo CD's
otelApplication syncsk8s/otel(k8s/argocd/apps/otel.yaml:13), so this policy is live on every cluster Argo CD manages. deploy-stack applies onlyotel/jaeger.yaml(_MANIFESTS_BY_STACK["infra"]), so a cluster without Argo CD has no otel perimeter at all. - Ingress rule 2 admits
ipBlock: 0.0.0.0/0on TCP 16686 (:31-32), next to the Traefik peer (:25-30) that already servesjaeger-ingress(ingress-routes.yaml:413). Under kube-router this admits every pod to the Jaeger UI, and it is live wherever Argo CD syncs the file. All four branch reviews of release/v0.2.25 reported it. - Rule 4 (
:46-55) admits onlymonitoringon 8888, butotel-metrics-ingressroutes Traefik to the collector on 8888 (ingress-routes.yaml:461). That route therefore fails under the policy.
Proposed remedy
- otel:
- drop the
0.0.0.0/0peer from rule 2 and keep the Traefik peer; - add the Traefik peer to rule 4 on 8888;
- give the policy a native deploy path, such as
_MANIFESTS_BY_STACK["infra"].
- drop the
- argocd:
- replace rule 2's
0.0.0.0/0with the Traefik peer plus whatever NodePort access needs, as a live check settles; - add an
ipBlockpeer for 6443 to the API-server egress, as fix(k8s): restore kubernetes cpu metrics and align monitoring dashboards to homelab-k3s #737 did for monitoring; - give the policy a deploy path that runs after the Argo CD Helm release.
- replace rule 2's
- Delete both entries from
UNDEPLOYED_NETWORK_POLICIES. The guard fails while an exempted policy is applied, so it forces this.
Acceptance criteria
- Neither policy has an ingress
ipBlock, pinned by a test liketest_monitoring_ingress_admits_no_world_cidr. - Argo CD's API-server egress admits 6443 through an
ipBlockpeer, pinned by a test. - otel rule 4 admits Traefik on 8888.
- A native deploy-stack applies both policies, and the guard test's argocd and otel exemptions are gone.
-
uv run devops cipasses. - Pending a person, on the homelab cluster:
kubectl diff -fboth files, and settle each difference;- after the argocd policy applies, Argo CD stays Synced/Healthy: UI through Traefik, NodePort access, repo-server Git and Helm pulls, API server;
- the Jaeger UI and
otel-metricsroutes answer through Traefik; - a pod in another namespace cannot reach 16686.
A mistake in Argo CD's policy stops GitOps sync, so its live check comes first. The owner chooses the milestone.
Related: #913, #953, #548, #737, #755, #1104.
Follow-up required by #913's pre-merge criterion (borrow reason: follow-up); #913's guard test exemptions cite this item. Filed directly with no priority; the roadmap service's intake sets Priority, Value and Effort.
Update 2026-10-08: refinement
#1082, #1387, #1393 and #1122 change k8s/argocd/networkpolicy.yaml and call this item only '#913's follow-up'; #1135 edits the k8s/otel/networkpolicy.yaml rules this item narrows (:31-35, :46-55). Applying the file keeps every rule that has landed; whichever lands second rebases.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
dan-petty-bot commentedon Oct 8, 2026
Intake placed this item to the backlog: at intake only a critical fix goes into a release; a release start pulls Ready items in, P0 features first.
The otel 0.0.0.0/0 ingress is live wherever Argo CD syncs the file, but the blast radius is a homelab cluster and the fix requires careful live verification before merging.Closes a real network-isolation gap in a homelab cluster and unblocks the guard test, but the affected environment is a single-person homelab rather than a multi-tenant production system.Requires editing rules in two policy files, adding deploy-stack paths, updating the guard-test exemption list, adding new tests, and performing live kubectl-diff and functional checks on a running cluster.dan-petty commentedon Oct 8, 2026
Placed in v0.2.31 on 2026-10-08 at the owner's request ("Populate 10 security and ci issues into each v0.2.30, v0.2.31, and v0.2.32 milestone"). This is a person's placement. Release theme: finding identity v2, URL credential masking, tests that leave no state, the Docker endpoint check and the Argo CD/OTel perimeters. Position 10 of 10 in the release's planned merge order. Its board Status is set to Ready, so the release-start fill keeps it.
fix(k8s): harden argocd and otel ingress perimeters and add deploy-st…
dan-petty-bot commentedon Oct 9, 2026
What changed
#1482, merged into
release/v0.2.31as b7edb8f.6 file(s) changed.
How it was verified
Check runs at 6541af5:
Acceptance Criteria of
docs/agent/tasks/task-1371-argocd-otel-perimeters.md:argocdnorotelperimeter has an ingressipBlock, pinned bytest_ingress_admits_no_world_cidr.ipBlockpeer with metadata SSRF protection, pinned bytest_argocd_api_server_egress_admits_6443_through_ipblock.test_otel_rule_4_admits_traefik_on_8888._MANIFESTS_BY_STACK["infra"], and the guard test's argocd and otel exemptions are removed fromUNDEPLOYED_NETWORK_POLICIES.uv run devops cipasses with 100% checks green and coverage >= 90%.kubectl diff -f k8s/argocd/networkpolicy.yamlandkubectl diff -f k8s/otel/networkpolicy.yaml, and settle each difference;otel-metricsroutes answer through Traefik;feat(release): v0.2.31 (#1490)
feat(k8s): the kube api is reachable off the home network at k8s.<dom…
feat(k8s): the kube api is reachable off the home network at k8s.<dom…
feat(release): v0.2.36 (#1615)