{{- if .Values.global.networkPolicy.create }} apiVersion: networking.k8s.io/v1 kind: NetworkPolicy metadata: labels: {{- include "argo-cd.labels" (dict "context" . "component" .Values.server.name "name" .Values.server.name) | nindent 4 }} name: {{ template "argo-cd.server.fullname" . }} namespace: {{ include "argo-cd.namespace" . }} spec: ingress: - {} podSelector: matchLabels: {{- include "argo-cd.selectorLabels" (dict "context" . "name" .Values.server.name) | nindent 6 }} policyTypes: - Ingress {{- end }}