mirror of
https://github.com/outbackdingo/Biohazard.git
synced 2026-03-21 08:39:42 +00:00
fix: Prom netpols
This commit is contained in:
@@ -23,6 +23,7 @@ spec:
|
||||
ingress.home.arpa/apiserver: "allow"
|
||||
egress.home.arpa/apiserver: "allow"
|
||||
egress.home.arpa/host: "allow"
|
||||
prom.home.arpa/kps: "allow"
|
||||
config:
|
||||
webhooks:
|
||||
- objectSelector:
|
||||
|
||||
33
kube/deploy/core/monitoring/kps/app/netpol.yaml
Normal file
33
kube/deploy/core/monitoring/kps/app/netpol.yaml
Normal file
@@ -0,0 +1,33 @@
|
||||
---
|
||||
# yaml-language-server: $schema=https://raw.githubusercontent.com/datreeio/CRDs-catalog/main/cilium.io/ciliumnetworkpolicy_v2.json
|
||||
apiVersion: cilium.io/v2
|
||||
kind: CiliumNetworkPolicy
|
||||
metadata:
|
||||
name: "kps-prometheus-egress-labelled"
|
||||
namespace: "monitoring"
|
||||
spec:
|
||||
description: "Allow Prometheus to egress to pods labelled with metrics exporters, no port restrictions"
|
||||
endpointSelector:
|
||||
matchLabels:
|
||||
prometheus: "kps"
|
||||
egress:
|
||||
- toEndpoints:
|
||||
- matchLabels:
|
||||
prom.home.arpa/kps: "allow"
|
||||
matchExpressions:
|
||||
- key: "io.kubernetes.pod.namespace"
|
||||
operator: "Exists"
|
||||
---
|
||||
apiVersion: "cilium.io/v2"
|
||||
kind: CiliumClusterwideNetworkPolicy
|
||||
metadata:
|
||||
name: "kps-prometheus-ingress-labelled"
|
||||
spec:
|
||||
description: "Allow Prometheus to egress to pods labelled with metrics exporters, no port restrictions"
|
||||
endpointSelector:
|
||||
matchLabels:
|
||||
prom.home.arpa/kps: "allow"
|
||||
ingress:
|
||||
- fromEndpoints:
|
||||
- matchLabels:
|
||||
prometheus: "kps"
|
||||
@@ -16,6 +16,13 @@ spec:
|
||||
- matchLabels:
|
||||
io.kubernetes.pod.namespace: "rook-ceph"
|
||||
app: "csi-rbdplugin"
|
||||
toPorts:
|
||||
- ports:
|
||||
- port: "9070"
|
||||
- toEndpoints:
|
||||
- matchLabels:
|
||||
io.kubernetes.pod.namespace: "rook-ceph"
|
||||
app: "csi-rbdplugin-provisioner"
|
||||
toPorts:
|
||||
- ports:
|
||||
- port: "9070"
|
||||
@@ -42,6 +42,7 @@ spec:
|
||||
labels:
|
||||
mgr:
|
||||
ingress.home.arpa/nginx: "allow"
|
||||
prom.home.arpa/kps: "allow"
|
||||
mon:
|
||||
count: 3
|
||||
allowMultiplePerNode: false
|
||||
|
||||
Reference in New Issue
Block a user