quorate/vendor/platform/kyverno/network-policies.yaml

214 lines
4.8 KiB
YAML
Raw Permalink Normal View History

---
apiVersion: cilium.io/v2
kind: CiliumNetworkPolicy
metadata:
name: kyverno-admission-controller
namespace: kyverno
spec:
endpointSelector:
matchLabels:
app.kubernetes.io/component: admission-controller
app.kubernetes.io/instance: kyverno
ingress:
- fromEntities:
- kube-apiserver
- host
- remote-node
toPorts:
- ports:
- port: "9443"
protocol: TCP
- fromEntities:
- host
toPorts:
- ports:
- port: "8000"
protocol: TCP
egress:
- toEntities:
- kube-apiserver
toPorts:
- ports:
- port: "6443"
protocol: TCP
- 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
---
apiVersion: cilium.io/v2
kind: CiliumNetworkPolicy
metadata:
name: kyverno-background-controller
namespace: kyverno
spec:
endpointSelector:
matchLabels:
app.kubernetes.io/component: background-controller
app.kubernetes.io/instance: kyverno
ingress:
- fromEntities:
- host
toPorts:
- ports:
- port: "8000"
protocol: TCP
egress:
- toEntities:
- kube-apiserver
toPorts:
- ports:
- port: "6443"
protocol: TCP
- 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
---
apiVersion: cilium.io/v2
kind: CiliumNetworkPolicy
metadata:
name: kyverno-cleanup-controller
namespace: kyverno
spec:
endpointSelector:
matchLabels:
app.kubernetes.io/component: cleanup-controller
app.kubernetes.io/instance: kyverno
ingress:
- fromEntities:
- kube-apiserver
- host
- remote-node
toPorts:
- ports:
- port: "9443"
protocol: TCP
- fromEntities:
- host
toPorts:
- ports:
- port: "8000"
protocol: TCP
egress:
- toEntities:
- kube-apiserver
toPorts:
- ports:
- port: "6443"
protocol: TCP
- 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
---
apiVersion: cilium.io/v2
kind: CiliumNetworkPolicy
metadata:
name: kyverno-reports-controller
namespace: kyverno
spec:
endpointSelector:
matchLabels:
app.kubernetes.io/component: reports-controller
app.kubernetes.io/instance: kyverno
ingress:
- fromEntities:
- host
toPorts:
- ports:
- port: "8000"
protocol: TCP
egress:
- toEntities:
- kube-apiserver
toPorts:
- ports:
- port: "6443"
protocol: TCP
- 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
---
apiVersion: cilium.io/v2
kind: CiliumClusterwideNetworkPolicy
metadata:
name: host-egress-kyverno
spec:
nodeSelector: {}
egress:
- toEndpoints:
- matchLabels:
k8s:io.kubernetes.pod.namespace: kyverno
app.kubernetes.io/instance: kyverno
toPorts:
- ports:
- port: "9443"
protocol: TCP
- port: "8000"
protocol: TCP