github.com/verrazzano/verrazzano@v1.7.0/platform-operator/thirdparty/charts/argo-cd/templates/argocd-repo-server/networkpolicy.yaml (about) 1 {{- if .Values.global.networkPolicy.create }} 2 apiVersion: networking.k8s.io/v1 3 kind: NetworkPolicy 4 metadata: 5 labels: 6 {{- include "argo-cd.labels" (dict "context" . "component" .Values.repoServer.name "name" .Values.repoServer.name) | nindent 4 }} 7 name: {{ template "argo-cd.repoServer.fullname" . }} 8 namespace: {{ .Release.Namespace | quote }} 9 spec: 10 ingress: 11 - from: 12 - podSelector: 13 matchLabels: 14 {{- include "argo-cd.selectorLabels" (dict "context" . "name" .Values.server.name) | nindent 10 }} 15 - podSelector: 16 matchLabels: 17 {{- include "argo-cd.selectorLabels" (dict "context" . "name" .Values.controller.name) | nindent 10 }} 18 {{- if .Values.notifications.enabled }} 19 - podSelector: 20 matchLabels: 21 {{- include "argo-cd.selectorLabels" (dict "context" . "name" .Values.notifications.name) | nindent 10 }} 22 {{- end }} 23 {{- if .Values.applicationSet.enabled }} 24 - podSelector: 25 matchLabels: 26 {{- include "argo-cd.selectorLabels" (dict "context" . "name" .Values.applicationSet.name) | nindent 10 }} 27 {{- end }} 28 ports: 29 - port: repo-server 30 protocol: TCP 31 {{- if .Values.repoServer.metrics.enabled }} 32 - from: 33 - namespaceSelector: {} 34 ports: 35 - port: metrics 36 {{- end }} 37 podSelector: 38 matchLabels: 39 {{- include "argo-cd.selectorLabels" (dict "context" . "name" .Values.repoServer.name) | nindent 6 }} 40 policyTypes: 41 - Ingress 42 {{- end }}