fix: prometheus network policy let prometheus-adapter pass (#1982)

This commit is contained in:
Siyuan Wang 2023-03-15 19:45:51 +08:00 committed by GitHub
parent f15d65e0b2
commit c3dad8c70b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 0 deletions

View File

@ -116,6 +116,18 @@ function(params) {
port: o.port,
protocol: 'TCP',
}, p.service.spec.ports),
}, {
from: [{
podSelector: {
matchLabels: {
'app.kubernetes.io/name': 'prometheus-adapter',
},
},
}],
ports: [{
port: 9090,
protocol: 'TCP',
}],
}, {
from: [{
podSelector: {

View File

@ -22,6 +22,13 @@ spec:
protocol: TCP
- port: 8080
protocol: TCP
- from:
- podSelector:
matchLabels:
app.kubernetes.io/name: prometheus-adapter
ports:
- port: 9090
protocol: TCP
- from:
- podSelector:
matchLabels: