diff options
author | makefunstuff <[email protected]> | 2024-06-28 21:19:56 +0200 |
---|---|---|
committer | makefunstuff <[email protected]> | 2024-06-28 21:19:56 +0200 |
commit | 70c535f34fb71645ab0f31392430060645ebeeec (patch) | |
tree | 86c0215b6295694994130abdedceaf6bc01a160d /tools/monitoring | |
parent | 4bff2f07a17b4e597eff0faa27ad351aa3d6504f (diff) | |
download | k3s-lab-70c535f34fb71645ab0f31392430060645ebeeec.tar.gz |
allow ingress to grafana
Diffstat (limited to 'tools/monitoring')
-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 |