Skip to content
Commits on Source (2)
......@@ -312,6 +312,75 @@ local kp =
// (import 'kube-prometheus/addons/custom-metrics.libsonnet') +
// (import 'kube-prometheus/addons/external-metrics.libsonnet') +
(import 'kube-prometheus/addons/pyrra.libsonnet') +
{
prometheus+: {
networkPolicy+: {
spec+: {
ingress: super.ingress + [
{
from: [
{
podSelector: {
matchLabels: {
"app.kubernetes.io/name": "pyrra"
}
}
},
{
podSelector: {
matchLabels: {
"app.kubernetes.io/name": "traefik"
}
},
namespaceSelector: {
matchLabels: {
"kubernetes.io/metadata.name": "traefik"
}
}
}
],
ports: [
{
port: 9090,
protocol: "TCP"
}
]
}
]
}
}
},
alertmanager+: {
networkPolicy+: {
spec+: {
ingress: super.ingress + [
{
from: [
{
podSelector: {
matchLabels: {
"app.kubernetes.io/name": "traefik"
}
},
namespaceSelector: {
matchLabels: {
"kubernetes.io/metadata.name": "traefik"
}
}
}
],
ports: [
{
port: 9093,
protocol: "TCP"
}
]
}
]
}
}
}
} +
{
values+:: {
common+: {
......
......@@ -31,6 +31,16 @@ spec:
protocol: TCP
- port: 9094
protocol: UDP
- from:
- namespaceSelector:
matchLabels:
kubernetes.io/metadata.name: traefik
podSelector:
matchLabels:
app.kubernetes.io/name: traefik
ports:
- port: 9093
protocol: TCP
podSelector:
matchLabels:
app.kubernetes.io/component: alert-router
......
......@@ -29,6 +29,19 @@ spec:
ports:
- port: 9090
protocol: TCP
- from:
- podSelector:
matchLabels:
app.kubernetes.io/name: pyrra
- namespaceSelector:
matchLabels:
kubernetes.io/metadata.name: traefik
podSelector:
matchLabels:
app.kubernetes.io/name: traefik
ports:
- port: 9090
protocol: TCP
podSelector:
matchLabels:
app.kubernetes.io/component: prometheus
......