diff options
-rw-r--r-- | tools/monitoring/templates/network-policy.yaml | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/tools/monitoring/templates/network-policy.yaml b/tools/monitoring/templates/network-policy.yaml index c7696cb..9e8bd65 100644 --- a/tools/monitoring/templates/network-policy.yaml +++ b/tools/monitoring/templates/network-policy.yaml @@ -11,7 +11,28 @@ spec: ingress: - from: - podSelector: {} - egress: - - to: - - podSelector: {} + - from: + - namespaceSelector: + matchLabels: + name: monitoring +--- +apiVersion: networking.k8s.io/v1 +kind: NetworkPolicy +metadata: + name: allow-ingress-to-grafana + namespace: monitoring +spec: + podSelector: + matchLabels: + app.kubernetes.io/name: grafana + ingress: + - from: + - namespaceSelector: + matchLabels: + name: kube-system + - podSelector: + matchLabels: + app: traefik + policyTypes: + - Ingress |