From 88a326bacdffde9e065b08ba893a17149584e72e Mon Sep 17 00:00:00 2001 From: Saumit Date: Sat, 11 Oct 2025 02:34:38 +0530 Subject: platform: Adding argocd helm chart --- .../templates/redis/networkpolicy.yaml | 35 ++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 astroshop-platform/argocd-helmchart/templates/redis/networkpolicy.yaml (limited to 'astroshop-platform/argocd-helmchart/templates/redis/networkpolicy.yaml') diff --git a/astroshop-platform/argocd-helmchart/templates/redis/networkpolicy.yaml b/astroshop-platform/argocd-helmchart/templates/redis/networkpolicy.yaml new file mode 100644 index 0000000..ccf0699 --- /dev/null +++ b/astroshop-platform/argocd-helmchart/templates/redis/networkpolicy.yaml @@ -0,0 +1,35 @@ +{{- $redisHa := (index .Values "redis-ha") -}} +{{- if and (or .Values.redis.networkPolicy.create .Values.global.networkPolicy.create) .Values.redis.enabled (not $redisHa.enabled) }} +apiVersion: networking.k8s.io/v1 +kind: NetworkPolicy +metadata: + labels: + {{- include "argo-cd.labels" (dict "context" . "component" .Values.redis.name "name" .Values.redis.name) | nindent 4 }} + name: {{ template "argo-cd.redis.fullname" . }} + namespace: {{ include "argo-cd.namespace" . }} +spec: + ingress: + - from: + - podSelector: + matchLabels: + {{- include "argo-cd.selectorLabels" (dict "context" . "name" .Values.server.name) | nindent 10 }} + - podSelector: + matchLabels: + {{- include "argo-cd.selectorLabels" (dict "context" . "name" .Values.repoServer.name) | nindent 10 }} + - podSelector: + matchLabels: + {{- include "argo-cd.selectorLabels" (dict "context" . "name" .Values.controller.name) | nindent 10 }} + ports: + - port: redis + protocol: TCP + - from: + - namespaceSelector: {} + ports: + - port: metrics + protocol: TCP + podSelector: + matchLabels: + {{- include "argo-cd.selectorLabels" (dict "context" . "name" .Values.redis.name) | nindent 6 }} + policyTypes: + - Ingress +{{- end }} -- cgit v1.2.3