Add support for prometheus
[ric-plt/ric-dep.git] / helm / infrastructure / subcharts / prometheus / templates / server-networkpolicy.yaml
1 {{- if .Values.server.enabled -}}
2 {{- if .Values.networkPolicy.enabled }}
3 apiVersion: {{ template "prometheus.networkPolicy.apiVersion" . }}
4 kind: NetworkPolicy
5 metadata:
6   name: {{ template "prometheus.server.fullname" . }}
7 {{ include "prometheus.namespace" . | indent 2 }}
8   labels:
9     {{- include "prometheus.server.labels" . | nindent 4 }}
10 spec:
11   podSelector:
12     matchLabels:
13       {{- include "prometheus.server.matchLabels" . | nindent 6 }}
14   ingress:
15     - ports:
16       - port: 9090
17 {{- end }}
18 {{- end }}