argocd-helm/charts/argo-cd/templates/argocd-application-controller/networkpolicy.yaml
Marco Kilchhofer 922799081d
feat(argo-cd): Add ability to create network policies (#800)
Signed-off-by: Marco Kilchhofer <mkilchhofer@users.noreply.github.com>
2021-07-13 08:35:25 +02:00

19 lines
575 B
YAML

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