From 2efad708c40dc1b3197d24a0e929624ac16ca98f Mon Sep 17 00:00:00 2001 From: Frank Jogeleit Date: Thu, 9 Sep 2021 21:55:57 +0200 Subject: [PATCH] configure additional eggress rules for kyvernoPlugin and UI Signed-off-by: Frank Jogeleit --- CHANGELOG.md | 5 ++++- charts/policy-reporter/Chart.lock | 8 ++++---- charts/policy-reporter/Chart.yaml | 6 +++--- charts/policy-reporter/charts/kyvernoPlugin/Chart.yaml | 2 +- .../charts/kyvernoPlugin/templates/networkpolicy.yaml | 3 +++ charts/policy-reporter/charts/kyvernoPlugin/values.yaml | 1 + charts/policy-reporter/charts/ui/Chart.yaml | 2 +- .../charts/ui/templates/networkpolicy.yaml | 3 +++ charts/policy-reporter/charts/ui/values.yaml | 1 + 9 files changed, 21 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8e0f8fa9..041af875 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,10 @@ # Changelog +# 1.9.2 +* Add additional egress rules to kyvernoPlugin and UI subchart with `networkPolicy.egress` + # 1.9.1 -* Configure the Kubernetes API Port for NetworkPolicy +* Configure the Kubernetes API Port for NetworkPolicy with `networkPolicy.kubernetesApiPort` # 1.9.0 * Implement NetworkPolicy for Policy Reporter and related Components [[#68](https://github.com/kyverno/policy-reporter/pull/68) by [windowsrefund](https://github.com/windowsrefund)] diff --git a/charts/policy-reporter/Chart.lock b/charts/policy-reporter/Chart.lock index 860cd554..5ecea8e6 100644 --- a/charts/policy-reporter/Chart.lock +++ b/charts/policy-reporter/Chart.lock @@ -4,9 +4,9 @@ dependencies: version: 1.4.4 - name: ui repository: "" - version: 1.9.0 + version: 1.9.1 - name: kyvernoPlugin repository: "" - version: 0.6.1 -digest: sha256:84d9269f9f276c3448d26968b31b69d593323c733dd1f687ca6f670426d4461b -generated: "2021-09-09T20:35:28.564714+02:00" + version: 0.6.2 +digest: sha256:b58f651ea7774420c8a6a5a80e1d9384f95521d0198a3a14f5491e6430e61498 +generated: "2021-09-09T21:51:59.713717+02:00" diff --git a/charts/policy-reporter/Chart.yaml b/charts/policy-reporter/Chart.yaml index 7c89e22c..0812750c 100644 --- a/charts/policy-reporter/Chart.yaml +++ b/charts/policy-reporter/Chart.yaml @@ -5,7 +5,7 @@ description: | It creates Prometheus Metrics and can send rule validation events to different targets like Loki, Elasticsearch, Slack or Discord type: application -version: 1.9.1 +version: 1.9.2 appVersion: 1.8.5 dependencies: @@ -16,8 +16,8 @@ dependencies: - name: ui condition: ui.enabled repository: "" - version: "1.9.0" + version: "1.9.1" - name: kyvernoPlugin condition: kyvernoPlugin.enabled repository: "" - version: "0.6.1" + version: "0.6.2" diff --git a/charts/policy-reporter/charts/kyvernoPlugin/Chart.yaml b/charts/policy-reporter/charts/kyvernoPlugin/Chart.yaml index af160d32..19d8a080 100644 --- a/charts/policy-reporter/charts/kyvernoPlugin/Chart.yaml +++ b/charts/policy-reporter/charts/kyvernoPlugin/Chart.yaml @@ -3,5 +3,5 @@ name: kyvernoPlugin description: Policy Reporter Kyverno Plugin type: application -version: 0.6.1 +version: 0.6.2 appVersion: 0.3.2 \ No newline at end of file diff --git a/charts/policy-reporter/charts/kyvernoPlugin/templates/networkpolicy.yaml b/charts/policy-reporter/charts/kyvernoPlugin/templates/networkpolicy.yaml index dfa6a9a6..1ec19990 100644 --- a/charts/policy-reporter/charts/kyvernoPlugin/templates/networkpolicy.yaml +++ b/charts/policy-reporter/charts/kyvernoPlugin/templates/networkpolicy.yaml @@ -24,4 +24,7 @@ spec: ports: - protocol: TCP port: {{ .Values.networkPolicy.kubernetesApiPort }} + {{- with .Values.networkPolicy.egress }} + {{- toYaml . | nindent 2 }} + {{- end }} {{- end }} diff --git a/charts/policy-reporter/charts/kyvernoPlugin/values.yaml b/charts/policy-reporter/charts/kyvernoPlugin/values.yaml index 3c347b15..c41dd12a 100644 --- a/charts/policy-reporter/charts/kyvernoPlugin/values.yaml +++ b/charts/policy-reporter/charts/kyvernoPlugin/values.yaml @@ -85,3 +85,4 @@ affinity: {} networkPolicy: enabled: false kubernetesApiPort: 6443 + egress: [] diff --git a/charts/policy-reporter/charts/ui/Chart.yaml b/charts/policy-reporter/charts/ui/Chart.yaml index 505ee33f..e6ba89d9 100644 --- a/charts/policy-reporter/charts/ui/Chart.yaml +++ b/charts/policy-reporter/charts/ui/Chart.yaml @@ -3,5 +3,5 @@ name: ui description: Policy Reporter UI type: application -version: 1.9.0 +version: 1.9.1 appVersion: 0.14.0 diff --git a/charts/policy-reporter/charts/ui/templates/networkpolicy.yaml b/charts/policy-reporter/charts/ui/templates/networkpolicy.yaml index 7707de5f..094508e1 100644 --- a/charts/policy-reporter/charts/ui/templates/networkpolicy.yaml +++ b/charts/policy-reporter/charts/ui/templates/networkpolicy.yaml @@ -20,4 +20,7 @@ spec: ports: - protocol: TCP port: {{ .Values.global.port }} + {{- with .Values.networkPolicy.egress }} + {{- toYaml . | nindent 2 }} + {{- end }} {{- end }} diff --git a/charts/policy-reporter/charts/ui/values.yaml b/charts/policy-reporter/charts/ui/values.yaml index eb920a9a..b0c4a9d5 100644 --- a/charts/policy-reporter/charts/ui/values.yaml +++ b/charts/policy-reporter/charts/ui/values.yaml @@ -104,3 +104,4 @@ affinity: {} # used and configured in a default-deny fashion. networkPolicy: enabled: false + egress: []