78 lines
1.9 KiB
YAML
78 lines
1.9 KiB
YAML
---
|
|
apiVersion: cilium.io/v2
|
|
kind: CiliumNetworkPolicy
|
|
metadata:
|
|
name: grafana-operator
|
|
namespace: grafana
|
|
spec:
|
|
endpointSelector:
|
|
matchLabels:
|
|
app.kubernetes.io/name: grafana-operator
|
|
app.kubernetes.io/instance: grafana-operator
|
|
ingress:
|
|
- fromEntities:
|
|
- host
|
|
toPorts:
|
|
- ports:
|
|
- port: "8081"
|
|
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
|
|
- toEndpoints:
|
|
- matchLabels:
|
|
k8s:io.kubernetes.pod.namespace: grafana
|
|
app.kubernetes.io/name: grafana
|
|
toPorts:
|
|
- ports:
|
|
- port: "3000"
|
|
protocol: TCP
|
|
- toServices:
|
|
- k8sService:
|
|
namespace: grafana
|
|
serviceName: grafana-service
|
|
toPorts:
|
|
- ports:
|
|
- port: "3000"
|
|
protocol: TCP
|
|
---
|
|
apiVersion: cilium.io/v2
|
|
kind: CiliumClusterwideNetworkPolicy
|
|
metadata:
|
|
name: host-egress-grafana-operator
|
|
spec:
|
|
nodeSelector: {}
|
|
egress:
|
|
- toEndpoints:
|
|
- matchLabels:
|
|
k8s:io.kubernetes.pod.namespace: grafana
|
|
app.kubernetes.io/name: grafana-operator
|
|
app.kubernetes.io/instance: grafana-operator
|
|
toPorts:
|
|
- ports:
|
|
- port: "8081"
|
|
protocol: TCP
|