UNCLASSIFIED

allow-monitoring.yaml 785 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10
{{- if and .Values.networkPolicies.enabled .Values.monitoring.enabled }}
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
  name: inbound-prometheus
spec:
  policyTypes:
    - Ingress
  podSelector:
    matchLabels:
Branden Cobb's avatar
Branden Cobb committed
11
      app.kubernetes.io/part-of: {{ include "argo-cd.name" . }}
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
  ingress:
    - from:
      - namespaceSelector:
          matchLabels:
            app.kubernetes.io/name: monitoring
        podSelector:
          matchLabels:
            app: prometheus
    - ports:
        - protocol: TCP
          port: {{ .Values.server.metrics.service.servicePort }}
        - protocol: TCP
          port: {{ .Values.repoServer.metrics.service.servicePort }}
        - protocol: TCP
          port: {{ .Values.controller.metrics.service.servicePort }}
{{- end }}