diff --git a/kubernetes/infrastructure/network-policies/home-assistant-ns.yaml b/kubernetes/infrastructure/network-policies/home-assistant-ns.yaml index e40dbc08..3b974389 100644 --- a/kubernetes/infrastructure/network-policies/home-assistant-ns.yaml +++ b/kubernetes/infrastructure/network-policies/home-assistant-ns.yaml @@ -467,7 +467,8 @@ spec: - port: "443" protocol: TCP --- -# zigbee2mqtt: Zigbee coordinator (SLZB) TCP socket. +# zigbee2mqtt: Zigbee coordinator (SLZB) TCP socket, and the OTA index and +# firmware images (Koenkk/zigbee-OTA) on raw.githubusercontent.com. apiVersion: cilium.io/v2 kind: CiliumNetworkPolicy metadata: @@ -498,6 +499,47 @@ spec: - ports: - port: "6638" protocol: TCP + - toFQDNs: + - matchName: "raw.githubusercontent.com" + toPorts: + - ports: + - port: "443" + protocol: TCP +--- +# matter-server: the CSA DCL (PAA root certificates, vendor names, OTA +# metadata) and the development PAA certificates of project-chip on GitHub. +apiVersion: cilium.io/v2 +kind: CiliumNetworkPolicy +metadata: + name: matter-server-egress + namespace: home-assistant +spec: + endpointSelector: + matchLabels: + app.kubernetes.io/name: matter-server + egress: + # rules.dns lets Cilium learn the toFQDNs mapping + - toEndpoints: + - matchLabels: + "k8s:io.kubernetes.pod.namespace": kube-system + k8s-app: kube-dns + toPorts: + - ports: + - port: "53" + protocol: UDP + - port: "53" + protocol: TCP + rules: + dns: + - matchPattern: "*" + - toFQDNs: + - matchName: "on.dcl.csa-iot.org" + - matchName: "api.github.com" + - matchName: "raw.githubusercontent.com" + toPorts: + - ports: + - port: "443" + protocol: TCP --- # mqtt-account-controller: credential delivery to deliver.esp32 targets in mqtt-accounts.yaml. apiVersion: cilium.io/v2