From a955ba93362cd3349d68511c01a26deec8a70f80 Mon Sep 17 00:00:00 2001 From: Zirko <64951262+QuantumEnigmaa@users.noreply.github.com> Date: Thu, 15 Feb 2024 16:22:18 +0100 Subject: [PATCH] Helm: fix ciliumNetworkPolicy template in the chart (#11963) Signed-off-by: QuantumEnigmaa --- production/helm/loki/CHANGELOG.md | 4 +++ production/helm/loki/Chart.yaml | 2 +- production/helm/loki/README.md | 2 +- .../loki/templates/ciliumnetworkpolicy.yaml | 29 +++++++++++-------- 4 files changed, 23 insertions(+), 14 deletions(-) diff --git a/production/helm/loki/CHANGELOG.md b/production/helm/loki/CHANGELOG.md index 47d8f6333e4e9..d232a7d6c7eae 100644 --- a/production/helm/loki/CHANGELOG.md +++ b/production/helm/loki/CHANGELOG.md @@ -14,6 +14,10 @@ Entries should include a reference to the pull request that introduced the chang [//]: # ( : do not remove this line. This locator is used by the CI pipeline to automatically create a changelog entry for each new Loki release. Add other chart versions and respective changelog entries bellow this line.) +## 5.43.1 + +- [BUGFIX] Fix `toPorts` fields in the `ciliumnetworkpolicy` template + ## 5.43.0 - [ENHANCEMENT] Allow the definition of resources for GrafanaAgent pods diff --git a/production/helm/loki/Chart.yaml b/production/helm/loki/Chart.yaml index ffa62c88d5cd3..49d7ca836b8a4 100644 --- a/production/helm/loki/Chart.yaml +++ b/production/helm/loki/Chart.yaml @@ -3,7 +3,7 @@ name: loki description: Helm chart for Grafana Loki in simple, scalable mode type: application appVersion: 2.9.4 -version: 5.43.0 +version: 5.43.1 home: https://grafana.github.io/helm-charts sources: - https://github.com/grafana/loki diff --git a/production/helm/loki/README.md b/production/helm/loki/README.md index 5db87e6d801e0..a4ef51dd9d5e6 100644 --- a/production/helm/loki/README.md +++ b/production/helm/loki/README.md @@ -1,6 +1,6 @@ # loki -![Version: 5.43.0](https://img.shields.io/badge/Version-5.43.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.9.4](https://img.shields.io/badge/AppVersion-2.9.4-informational?style=flat-square) +![Version: 5.43.1](https://img.shields.io/badge/Version-5.43.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.9.4](https://img.shields.io/badge/AppVersion-2.9.4-informational?style=flat-square) Helm chart for Grafana Loki in simple, scalable mode diff --git a/production/helm/loki/templates/ciliumnetworkpolicy.yaml b/production/helm/loki/templates/ciliumnetworkpolicy.yaml index ddcef3b61a8ec..1eb1644dd850e 100644 --- a/production/helm/loki/templates/ciliumnetworkpolicy.yaml +++ b/production/helm/loki/templates/ciliumnetworkpolicy.yaml @@ -60,8 +60,9 @@ spec: {{- include "loki.selectorLabels" . | nindent 6 }} ingress: - toPorts: - - port: http - protocol: TCP + - ports: + - port: http + protocol: TCP {{- if .Values.networkPolicy.ingress.namespaceSelector }} fromEndpoints: - matchLabels: @@ -85,8 +86,9 @@ spec: {{- include "loki.selectorLabels" . | nindent 6 }} ingress: - toPorts: - - port: http-metrics - protocol: TCP + - ports: + - port: http-metrics + protocol: TCP {{- if .Values.networkPolicy.metrics.cidrs }} {{- range $cidr := .Values.networkPolicy.metrics.cidrs }} toCIDR: @@ -116,8 +118,9 @@ spec: {{- include "loki.backendSelectorLabels" . | nindent 6 }} egress: - toPorts: - - port: {{ .Values.networkPolicy.alertmanager.port }} - protocol: TCP + - ports: + - port: "{{ .Values.networkPolicy.alertmanager.port }}" + protocol: TCP {{- if .Values.networkPolicy.alertmanager.namespaceSelector }} toEndpoints: - matchLabels: @@ -142,10 +145,11 @@ spec: {{- include "loki.selectorLabels" . | nindent 6 }} egress: - toPorts: - {{- range $port := .Values.networkPolicy.externalStorage.ports }} - - port: {{ $port }} - protocol: TCP - {{- end }} + - ports: + {{- range $port := .Values.networkPolicy.externalStorage.ports }} + - port: "{{ $port }}" + protocol: TCP + {{- end }}à {{- if .Values.networkPolicy.externalStorage.cidrs }} {{- range $cidr := .Values.networkPolicy.externalStorage.cidrs }} toCIDR: @@ -171,8 +175,9 @@ spec: {{- include "loki.selectorLabels" . | nindent 6 }} egress: - toPorts: - - port: {{ .Values.networkPolicy.discovery.port }} - protocol: TCP + - ports: + - port: "{{ .Values.networkPolicy.discovery.port }}" + protocol: TCP {{- if .Values.networkPolicy.discovery.namespaceSelector }} toEndpoints: - matchLabels: