summaryrefslogtreecommitdiff
path: root/astroshop-platform/argocd-helmchart/templates/argocd-notifications/networkpolicy.yaml
diff options
context:
space:
mode:
Diffstat (limited to 'astroshop-platform/argocd-helmchart/templates/argocd-notifications/networkpolicy.yaml')
-rw-r--r--astroshop-platform/argocd-helmchart/templates/argocd-notifications/networkpolicy.yaml20
1 files changed, 20 insertions, 0 deletions
diff --git a/astroshop-platform/argocd-helmchart/templates/argocd-notifications/networkpolicy.yaml b/astroshop-platform/argocd-helmchart/templates/argocd-notifications/networkpolicy.yaml
new file mode 100644
index 0000000..1a5df53
--- /dev/null
+++ b/astroshop-platform/argocd-helmchart/templates/argocd-notifications/networkpolicy.yaml
@@ -0,0 +1,20 @@
+{{- if and .Values.notifications.enabled (or .Values.notifications.networkPolicy.create .Values.global.networkPolicy.create) .Values.notifications.metrics.enabled }}
+apiVersion: networking.k8s.io/v1
+kind: NetworkPolicy
+metadata:
+ name: {{ template "argo-cd.notifications.fullname" . }}
+ namespace: {{ include "argo-cd.namespace" . }}
+ labels:
+ {{- include "argo-cd.labels" (dict "context" . "component" .Values.notifications.name "name" .Values.notifications.name) | nindent 4 }}
+spec:
+ ingress:
+ - from:
+ - namespaceSelector: {}
+ ports:
+ - port: metrics
+ podSelector:
+ matchLabels:
+ {{- include "argo-cd.selectorLabels" (dict "context" . "name" .Values.notifications.name) | nindent 6 }}
+ policyTypes:
+ - Ingress
+{{- end }}