From 3a28e6d813352557db2e5e81548190d21d860f72 Mon Sep 17 00:00:00 2001 From: tm8enk Date: Mon, 8 Feb 2021 13:04:47 +0000 Subject: [PATCH] add ingress policy --- charts/neo4j/Chart.yaml | 2 +- .../neo4j/templates/networkpolicy-ingress.yaml | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 charts/neo4j/templates/networkpolicy-ingress.yaml diff --git a/charts/neo4j/Chart.yaml b/charts/neo4j/Chart.yaml index d96667e3..3d1dde45 100644 --- a/charts/neo4j/Chart.yaml +++ b/charts/neo4j/Chart.yaml @@ -15,7 +15,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.2.1 +version: 0.2.2 # This is the version number of the application being deployed. This version number should be diff --git a/charts/neo4j/templates/networkpolicy-ingress.yaml b/charts/neo4j/templates/networkpolicy-ingress.yaml new file mode 100644 index 00000000..e14e2e02 --- /dev/null +++ b/charts/neo4j/templates/networkpolicy-ingress.yaml @@ -0,0 +1,17 @@ +{{- if .Values.security.networkPolicy.enable -}} +{{- if .Values.ingress.enabled -}} +kind: NetworkPolicy +apiVersion: networking.k8s.io/v1 +metadata: + name: {{ include "neo4j.fullname" . }}-2 +spec: + podSelector: + matchLabels: + {{- include "neo4j.selectorLabels" . | nindent 6 }} + ingress: + - from: + {{- toYaml .Values.security.networkPolicy.from | nindent 4 }} + policyTypes: + - Ingress +{{- end }} +{{- end }} \ No newline at end of file