github.com/verrazzano/verrazzano@v1.7.0/platform-operator/thirdparty/charts/argo-cd/templates/dex/networkpolicy.yaml (about) 1 {{- if and .Values.global.networkPolicy.create .Values.dex.enabled }} 2 apiVersion: networking.k8s.io/v1 3 kind: NetworkPolicy 4 metadata: 5 labels: 6 {{- include "argo-cd.labels" (dict "context" . "component" .Values.dex.name "name" .Values.dex.name) | nindent 4 }} 7 name: {{ template "argo-cd.dex.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 ports: 16 - port: http 17 protocol: TCP 18 - port: grpc 19 protocol: TCP 20 {{- if .Values.dex.metrics.enabled }} 21 - from: 22 - namespaceSelector: {} 23 ports: 24 - port: metrics 25 protocol: TCP 26 {{- end }} 27 podSelector: 28 matchLabels: 29 {{- include "argo-cd.selectorLabels" (dict "context" . "name" .Values.dex.name) | nindent 6 }} 30 policyTypes: 31 - Ingress 32 {{- end }}