network-policy.yaml 470 B

12345678910111213141516
  1. {{- if .Values.networkPolicy.enabled }}
  2. apiVersion: {{ template "prometheus.networkPolicy.apiVersion" . }}
  3. kind: NetworkPolicy
  4. metadata:
  5. name: {{ template "prometheus.server.fullname" . }}
  6. {{ include "prometheus.namespace" . | indent 2 }}
  7. labels:
  8. {{- include "prometheus.server.labels" . | nindent 4 }}
  9. spec:
  10. podSelector:
  11. matchLabels:
  12. {{- include "prometheus.server.matchLabels" . | nindent 6 }}
  13. ingress:
  14. - ports:
  15. - port: 9090
  16. {{- end }}