quorate/vendor/workloads/frigate/network-policies.yaml

204 lines
5.2 KiB
YAML
Raw Permalink Normal View History

apiVersion: cilium.io/v2
kind: CiliumNetworkPolicy
metadata:
name: frigate
namespace: frigate
spec:
endpointSelector:
matchLabels:
app.kubernetes.io/name: frigate
app.kubernetes.io/instance: frigate
ingress:
- fromEntities:
- host
toPorts:
- ports:
- port: "8971"
protocol: TCP
- fromEndpoints:
- matchLabels:
k8s:io.kubernetes.pod.namespace: frigate
app.kubernetes.io/name: oauth2-proxy
app.kubernetes.io/instance: frigate
toPorts:
- ports:
- port: "8971"
protocol: TCP
egress:
- 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: "*"
- toServices:
- k8sService:
namespace: kube-system
serviceName: kube-dns
toPorts:
- ports:
- port: "53"
protocol: UDP
- port: "53"
protocol: TCP
- toEndpoints:
- matchLabels:
k8s:io.kubernetes.pod.namespace: versitygw
app.kubernetes.io/name: versitygw
app.kubernetes.io/instance: versitygw
toPorts:
- ports:
- port: "7070"
protocol: TCP
- toCIDR:
- 10.82.151.234/24
toPorts:
- ports:
- port: "554"
protocol: TCP
---
apiVersion: cilium.io/v2
kind: CiliumNetworkPolicy
metadata:
name: frigate-oauth2-proxy
namespace: frigate
spec:
endpointSelector:
matchLabels:
app.kubernetes.io/name: oauth2-proxy
app.kubernetes.io/instance: frigate
ingress:
- fromEntities:
- host
- ingress
toPorts:
- ports:
- port: "4180"
protocol: TCP
- fromEndpoints:
- matchLabels:
k8s:io.kubernetes.pod.namespace: kube-system
gateway.networking.k8s.io/gateway-name: gateway-internal
toPorts:
- ports:
- port: "4180"
protocol: TCP
egress:
- toEndpoints:
- matchLabels:
k8s:io.kubernetes.pod.namespace: kube-system
k8s-app: kube-dns
toPorts:
- ports:
- port: "53"
protocol: UDP
- port: "53"
protocol: TCP
- toServices:
- k8sService:
namespace: kube-system
serviceName: kube-dns
toPorts:
- ports:
- port: "53"
protocol: UDP
- port: "53"
protocol: TCP
- toEndpoints:
- matchLabels:
k8s:io.kubernetes.pod.namespace: frigate
app.kubernetes.io/name: frigate
app.kubernetes.io/instance: frigate
toPorts:
- ports:
- port: "8971"
protocol: TCP
- toEndpoints:
- matchLabels:
k8s:io.kubernetes.pod.namespace: zitadel
app.kubernetes.io/name: zitadel-oidc-internal
app.kubernetes.io/instance: zitadel
toPorts:
- ports:
- port: "8080"
protocol: TCP
---
apiVersion: cilium.io/v2
kind: CiliumClusterwideNetworkPolicy
metadata:
name: gateway-internal-egress-frigate-oauth2-proxy
spec:
endpointSelector:
matchLabels:
"reserved:ingress": ""
egress:
- toEndpoints:
- matchLabels:
k8s:io.kubernetes.pod.namespace: frigate
app.kubernetes.io/name: oauth2-proxy
app.kubernetes.io/instance: frigate
toPorts:
- ports:
- port: "4180"
protocol: TCP
---
apiVersion: cilium.io/v2
kind: CiliumClusterwideNetworkPolicy
metadata:
name: host-egress-frigate
spec:
nodeSelector: {}
egress:
- toEndpoints:
- matchLabels:
k8s:io.kubernetes.pod.namespace: frigate
app.kubernetes.io/name: frigate
app.kubernetes.io/instance: frigate
toPorts:
- ports:
- port: "8971"
protocol: TCP
- toEndpoints:
- matchLabels:
k8s:io.kubernetes.pod.namespace: frigate
app.kubernetes.io/name: oauth2-proxy
app.kubernetes.io/instance: frigate
toPorts:
- ports:
- port: "4180"
protocol: TCP
---
apiVersion: cilium.io/v2
kind: CiliumClusterwideNetworkPolicy
metadata:
name: host-ingress-frigate-replies
spec:
nodeSelector: {}
ingress:
- fromEndpoints:
- matchLabels:
k8s:io.kubernetes.pod.namespace: frigate
app.kubernetes.io/name: frigate
app.kubernetes.io/instance: frigate
toPorts:
- ports:
- port: "32768"
endPort: 60999
protocol: TCP
- fromEndpoints:
- matchLabels:
k8s:io.kubernetes.pod.namespace: frigate
app.kubernetes.io/name: oauth2-proxy
app.kubernetes.io/instance: frigate
toPorts:
- ports:
- port: "32768"
endPort: 60999
protocol: TCP