diff --git a/jsonnet/kube-prometheus/components/prometheus.libsonnet b/jsonnet/kube-prometheus/components/prometheus.libsonnet index f72f19f9cfa2e96c0f53146fb0ead8d6fe7c029f..089d7bb652ff6d079eb930e567dd55f66291f601 100644 --- a/jsonnet/kube-prometheus/components/prometheus.libsonnet +++ b/jsonnet/kube-prometheus/components/prometheus.libsonnet @@ -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: { diff --git a/manifests/prometheus-networkPolicy.yaml b/manifests/prometheus-networkPolicy.yaml index f0f6c90b7ccc5c81bad6c9940765bad797b56a62..c25a4457bba1031e8a1a9374999ef6eef5aba229 100644 --- a/manifests/prometheus-networkPolicy.yaml +++ b/manifests/prometheus-networkPolicy.yaml @@ -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: