fix(forgejo-runner): egress to ingress-nginx by namespace, not a stale LB IP
This commit is contained in:
@@ -29,13 +29,23 @@ spec:
|
|||||||
except:
|
except:
|
||||||
- 192.168.1.0/24
|
- 192.168.1.0/24
|
||||||
- 10.244.0.0/16
|
- 10.244.0.0/16
|
||||||
# Single LAN exception: the ingress-nginx LoadBalancer, which is how
|
# ingress-nginx, which is how forgejo.riotpiao.com resolves (CoreDNS
|
||||||
# forgejo.riotpiao.com resolves. Image pushes go to that name so the tag
|
# rewrites that name to ingress-nginx-controller.ingress-nginx.svc).
|
||||||
# matches what containerd pulls on the nodes; without this the whole /24 is
|
# Image pushes go to that name so the tag matches what containerd pulls
|
||||||
# denied above and `docker push` hangs until it times out.
|
# on the nodes; without this the whole /24 and pod CIDR are denied above
|
||||||
|
# and `docker push`/`docker login` hang until they time out.
|
||||||
|
#
|
||||||
|
# Was an ipBlock pinned to the ingress-nginx LoadBalancer's LAN IP. That
|
||||||
|
# stopped matching once DNS started resolving the name to the Service's
|
||||||
|
# ClusterIP instead of the LB IP: Cilium enforces egress against the
|
||||||
|
# post-DNAT pod IP, which falls inside the 10.244.0.0/16 exclusion above,
|
||||||
|
# so every request silently hung rather than erroring. A namespaceSelector
|
||||||
|
# follows the Service wherever it resolves and needs no IP to stay in
|
||||||
|
# sync with -- same pattern as the kube-system DNS rule above.
|
||||||
- to:
|
- to:
|
||||||
- ipBlock:
|
- namespaceSelector:
|
||||||
cidr: {{ .Values.egress.ingressLoadBalancerIP }}/32
|
matchLabels:
|
||||||
|
kubernetes.io/metadata.name: ingress-nginx
|
||||||
ports:
|
ports:
|
||||||
- protocol: TCP
|
- protocol: TCP
|
||||||
port: 443
|
port: 443
|
||||||
|
|||||||
@@ -47,10 +47,3 @@ tolerations:
|
|||||||
# attach there.
|
# attach there.
|
||||||
nodeSelector:
|
nodeSelector:
|
||||||
topology.kubernetes.io/zone: az-a
|
topology.kubernetes.io/zone: az-a
|
||||||
|
|
||||||
# Egress exceptions. The NetworkPolicy denies the whole LAN /24 by default;
|
|
||||||
# this is the one address punched back through, because forgejo.riotpiao.com
|
|
||||||
# (the image registry) resolves to the ingress-nginx LoadBalancer.
|
|
||||||
# Must match the Cilium LB pool allocation — pool is 192.168.1.160/28.
|
|
||||||
egress:
|
|
||||||
ingressLoadBalancerIP: 192.168.1.160
|
|
||||||
|
|||||||
Reference in New Issue
Block a user