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