From 911091a980b6bb51dc85e0749f2540b8ae1d2ee9 Mon Sep 17 00:00:00 2001 From: PT-ATA No One Date: Wed, 28 Feb 2024 11:38:27 +0100 Subject: [PATCH 1/2] add value for creating network policy --- charts/gdscan/Chart.yaml | 2 +- charts/gdscan/templates/networkpolicy.yaml | 18 ++++++++++++++++++ charts/gdscan/values.yaml | 3 +++ 3 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 charts/gdscan/templates/networkpolicy.yaml diff --git a/charts/gdscan/Chart.yaml b/charts/gdscan/Chart.yaml index c09ab20..c2f22ff 100644 --- a/charts/gdscan/Chart.yaml +++ b/charts/gdscan/Chart.yaml @@ -5,4 +5,4 @@ maintainers: - name: G DATA CyberDefense AG email: oem@gdata.de type: application -version: 1.5.0 +version: 1.6.0 diff --git a/charts/gdscan/templates/networkpolicy.yaml b/charts/gdscan/templates/networkpolicy.yaml new file mode 100644 index 0000000..0598d4c --- /dev/null +++ b/charts/gdscan/templates/networkpolicy.yaml @@ -0,0 +1,18 @@ +{{- if .Values.networkPolicy.enabled }} +apiVersion: networking.k8s.io/v1 +kind: NetworkPolicy +metadata: + name: {{ include "gdscan.fullname" . }} + labels: + {{- include "gdscan.labels" . | nindent 4 }} +spec: + podSelector: + matchLabels: + {{- include "gdscan.selectorLabels" . | nindent 6 }} + policyTypes: + - Ingress + ingress: + - from: + ports: + - port: 8080 # Http +{{- end }} \ No newline at end of file diff --git a/charts/gdscan/values.yaml b/charts/gdscan/values.yaml index 7e109a0..11ac69b 100644 --- a/charts/gdscan/values.yaml +++ b/charts/gdscan/values.yaml @@ -24,6 +24,9 @@ imagePullSecrets: nameOverride: "" fullnameOverride: "" +networkPolicy: + enabled: false + podAnnotations: {} secret: From 3196401ceed7c100bb41a9884b29ed78b0fdc6cc Mon Sep 17 00:00:00 2001 From: PT-ATA No One Date: Wed, 28 Feb 2024 11:41:21 +0100 Subject: [PATCH 2/2] increase version --- charts/gdscan/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/gdscan/Chart.yaml b/charts/gdscan/Chart.yaml index 6251ffc..597c29d 100644 --- a/charts/gdscan/Chart.yaml +++ b/charts/gdscan/Chart.yaml @@ -5,4 +5,4 @@ maintainers: - name: G DATA CyberDefense AG email: oem@gdata.de type: application -version: 1.7.0 +version: 1.8.0