Skip to content

Commit

Permalink
Merge pull request #1721 from ArthurSens/graf-prom-network-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
paulfantom authored Apr 11, 2022
2 parents b79f451 + 8bdd526 commit 6053258
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
12 changes: 12 additions & 0 deletions jsonnet/kube-prometheus/components/prometheus.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,18 @@ function(params) {
port: o.port,
protocol: 'TCP',
}, p.service.spec.ports),
}, {
from: [{
podSelector: {
matchLabels: {
'app.kubernetes.io/name': 'grafana',
},
},
}],
ports: [{
port: 9090,
protocol: 'TCP',
}],
}],
},
},
Expand Down
7 changes: 7 additions & 0 deletions manifests/prometheus-networkPolicy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@ spec:
protocol: TCP
- port: 8080
protocol: TCP
- from:
- podSelector:
matchLabels:
app.kubernetes.io/name: grafana
ports:
- port: 9090
protocol: TCP
podSelector:
matchLabels:
app.kubernetes.io/component: prometheus
Expand Down

0 comments on commit 6053258

Please sign in to comment.