65 lines
1.7 KiB
YAML
65 lines
1.7 KiB
YAML
|
|
---
|
||
|
|
apiVersion: cilium.io/v2
|
||
|
|
kind: CiliumNetworkPolicy
|
||
|
|
metadata:
|
||
|
|
name: victorialogs
|
||
|
|
namespace: victorialogs
|
||
|
|
spec:
|
||
|
|
endpointSelector:
|
||
|
|
matchLabels:
|
||
|
|
managed-by: vm-operator
|
||
|
|
ingress:
|
||
|
|
- fromEntities:
|
||
|
|
- host
|
||
|
|
- fromEndpoints:
|
||
|
|
- matchLabels:
|
||
|
|
k8s:io.kubernetes.pod.namespace: victorialogs
|
||
|
|
- fromEndpoints:
|
||
|
|
- matchLabels:
|
||
|
|
k8s:io.kubernetes.pod.namespace: victoriametrics
|
||
|
|
app.kubernetes.io/name: vmagent
|
||
|
|
app.kubernetes.io/instance: main
|
||
|
|
- fromEndpoints:
|
||
|
|
- matchLabels:
|
||
|
|
k8s:io.kubernetes.pod.namespace: victoriametrics
|
||
|
|
app.kubernetes.io/name: vmauth
|
||
|
|
app.kubernetes.io/instance: main
|
||
|
|
- fromEndpoints:
|
||
|
|
- matchLabels:
|
||
|
|
k8s:io.kubernetes.pod.namespace: vlagent
|
||
|
|
toPorts:
|
||
|
|
- ports:
|
||
|
|
- port: "9481"
|
||
|
|
protocol: TCP
|
||
|
|
egress:
|
||
|
|
- toEndpoints:
|
||
|
|
- matchLabels:
|
||
|
|
k8s:io.kubernetes.pod.namespace: victorialogs
|
||
|
|
- 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
|
||
|
|
---
|
||
|
|
apiVersion: cilium.io/v2
|
||
|
|
kind: CiliumClusterwideNetworkPolicy
|
||
|
|
metadata:
|
||
|
|
name: host-egress-victorialogs
|
||
|
|
spec:
|
||
|
|
nodeSelector: {}
|
||
|
|
egress:
|
||
|
|
- toEndpoints:
|
||
|
|
- matchLabels:
|
||
|
|
k8s:io.kubernetes.pod.namespace: victorialogs
|
||
|
|
managed-by: vm-operator
|