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