github.com/microsoft/fabrikate@v1.0.0-alpha.1.0.20210115014322-dc09194d0885/testdata/local-charts/prometheus/templates/pushgateway/netpol.yaml (about) 1 {{- if and .Values.pushgateway.enabled .Values.networkPolicy.enabled -}} 2 apiVersion: {{ template "prometheus.networkPolicy.apiVersion" . }} 3 kind: NetworkPolicy 4 metadata: 5 name: {{ template "prometheus.pushgateway.fullname" . }} 6 {{ include "prometheus.namespace" . | indent 2 }} 7 labels: 8 {{- include "prometheus.pushgateway.labels" . | nindent 4 }} 9 spec: 10 podSelector: 11 matchLabels: 12 {{- include "prometheus.pushgateway.matchLabels" . | nindent 6 }} 13 ingress: 14 - from: 15 - podSelector: 16 matchLabels: 17 {{- include "prometheus.server.matchLabels" . | nindent 12 }} 18 - ports: 19 - port: 9091 20 {{- end -}}