diff --git a/apps/base/forgejo/networkpolicy.yaml b/apps/base/forgejo/networkpolicy.yaml index 1984aa5..5600b1b 100644 --- a/apps/base/forgejo/networkpolicy.yaml +++ b/apps/base/forgejo/networkpolicy.yaml @@ -9,7 +9,10 @@ # so they arrive through the Gateway as `reserved:ingress` too and no # cross-namespace rule is needed. Node/health entities cover kubelet # probes; Prometheus in `monitoring` is allowed on 9187 only (the -# `cnpg-pg` PodMonitor scrapes the CNPG instance manager). +# `cnpg-pg` PodMonitor scrapes the CNPG instance manager), and the +# CNPG operator in `cnpg-system` on 8000 only — the instance +# manager's HTTPS status endpoint the operator reads to derive the +# system ID and drive failover (card t_4210edec). # egress: cluster DNS; its own pods (forgejo -> pg-rw:5432); `world` for # outbound HTTPS (Forgejo webhooks, avatar/mirror fetches, the # public-URL callbacks the runner flow needs); node IPs on 22, which @@ -54,6 +57,19 @@ spec: - fromEndpoints: - matchLabels: io.kubernetes.pod.namespace: forgejo + # The CNPG operator (`cnpg-system`) reads the instance manager's HTTPS + # status endpoint to derive the system ID and drive switchover/promotion. + # Without it the Cluster reports `Instance Status Extraction Error` and + # Ready=False while the pods serve traffic, and automated failover is dead + # (card t_4210edec). Scoped to 8000: not 5432, not the whole namespace. + - fromEndpoints: + - matchLabels: + io.kubernetes.pod.namespace: cnpg-system + app.kubernetes.io/name: cloudnative-pg + toPorts: + - ports: + - port: "8000" + protocol: TCP # Prometheus scrapes the CNPG `pg` instance manager on 9187. - fromEndpoints: - matchLabels: diff --git a/apps/base/sirius-growth/networkpolicy.yaml b/apps/base/sirius-growth/networkpolicy.yaml index 4f989c6..8a7ddb5 100644 --- a/apps/base/sirius-growth/networkpolicy.yaml +++ b/apps/base/sirius-growth/networkpolicy.yaml @@ -6,8 +6,11 @@ # ingress: Cilium Gateway proxy (`reserved:ingress`) for # siriusgrowthsolutions.com -> site:80 / contact:8090 / # portal-gate:8080 / portal:8091 / blog:8092, node entities for -# kubelet probes, and Prometheus in `monitoring` on 9187 only (the -# `cnpg-portal` PodMonitor scrapes the CNPG instance manager). +# kubelet probes, Prometheus in `monitoring` on 9187 only (the +# `cnpg-portal` PodMonitor scrapes the CNPG instance manager), and +# the CNPG operator in `cnpg-system` on 8000 only — the instance +# manager's HTTPS status endpoint the operator reads to derive the +# system ID and drive failover (card t_4210edec). # egress: cluster DNS; its own pods (blog/portal -> portal-1:5432, # portal-gate -> portal:8091); `world` for the Telegram Bot API # (contact + portal) and the leadgen crawlers; the node IPs on 3900 @@ -53,6 +56,19 @@ spec: - fromEndpoints: - matchLabels: io.kubernetes.pod.namespace: sirius-growth + # The CNPG operator (`cnpg-system`) reads the instance manager's HTTPS + # status endpoint to derive the system ID and drive switchover/promotion. + # Without it the Cluster reports `Instance Status Extraction Error` and + # Ready=False while the pods serve traffic, and automated failover is dead + # (card t_4210edec). Scoped to 8000: not 5432, not the whole namespace. + - fromEndpoints: + - matchLabels: + io.kubernetes.pod.namespace: cnpg-system + app.kubernetes.io/name: cloudnative-pg + toPorts: + - ports: + - port: "8000" + protocol: TCP # Prometheus scrapes the CNPG `portal` instance manager on 9187. - fromEndpoints: - matchLabels: