github.com/verrazzano/verrazzano@v1.7.0/platform-operator/thirdparty/charts/prometheus-community/prometheus-node-exporter/templates/networkpolicy.yaml (about)

     1  {{- if .Values.networkPolicy.enabled }}
     2  apiVersion: networking.k8s.io/v1
     3  kind: NetworkPolicy
     4  metadata:
     5    name: {{ include "prometheus-node-exporter.fullname" . }}
     6    namespace: {{ include "prometheus-node-exporter.namespace" . }}
     7    labels:
     8      {{- include "prometheus-node-exporter.labels" $ | nindent 4 }}
     9    {{- with .Values.service.annotations }}
    10    annotations:
    11      {{- toYaml . | nindent 4 }}
    12    {{- end }}
    13  spec:
    14    ingress:
    15      - ports:
    16        - port: {{ .Values.service.port }}
    17    policyTypes:
    18      - Egress
    19      - Ingress
    20    podSelector:
    21      matchLabels:
    22        {{- include "prometheus-node-exporter.selectorLabels" . | nindent 6 }}
    23  {{- end }}