From 785a40f5e5698d9a34ce6bfc45cd27b8c41dfd85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9lian=20SAINT-BONNET?= Date: Thu, 30 Jun 2022 17:09:39 +0200 Subject: [PATCH 1/2] Add externalTrafficPolicy setting to services --- charts/crowdsec/templates/agent-service.yaml | 3 +++ charts/crowdsec/templates/lapi-service.yaml | 3 +++ charts/crowdsec/values.yaml | 2 ++ 3 files changed, 8 insertions(+) diff --git a/charts/crowdsec/templates/agent-service.yaml b/charts/crowdsec/templates/agent-service.yaml index 705007f..f696eb4 100644 --- a/charts/crowdsec/templates/agent-service.yaml +++ b/charts/crowdsec/templates/agent-service.yaml @@ -24,6 +24,9 @@ spec: externalIPs: {{- toYaml . | nindent 4 }} {{- end }} + {{- if or (eq .Values.agent.service.type "LoadBalancer") (eq .Values.agent.service.type "NodePort") }} + externalTrafficPolicy: {{ .Values.agent.service.externalTrafficPolicy | quote }} + {{- end }} ports: - port: 6060 targetPort: 6060 diff --git a/charts/crowdsec/templates/lapi-service.yaml b/charts/crowdsec/templates/lapi-service.yaml index ac2f6a9..424459a 100644 --- a/charts/crowdsec/templates/lapi-service.yaml +++ b/charts/crowdsec/templates/lapi-service.yaml @@ -23,6 +23,9 @@ spec: externalIPs: {{- toYaml . | nindent 4 }} {{- end }} + {{- if or (eq .Values.lapi.service.type "LoadBalancer") (eq .Values.lapi.service.type "NodePort") }} + externalTrafficPolicy: {{ .Values.lapi.service.externalTrafficPolicy | quote }} + {{- end }} ports: {{- if .Values.lapi.metrics.enabled }} - port: 6060 diff --git a/charts/crowdsec/values.yaml b/charts/crowdsec/values.yaml index ab0cb9a..03f7981 100644 --- a/charts/crowdsec/values.yaml +++ b/charts/crowdsec/values.yaml @@ -144,6 +144,7 @@ lapi: externalIPs: [] loadBalancerIP: null loadBalancerClass: null + externalTrafficPolicy: Cluster # -- nodeSelector for lapi nodeSelector: {} @@ -240,6 +241,7 @@ agent: externalIPs: [] loadBalancerIP: null loadBalancerClass: null + externalTrafficPolicy: Cluster # -- wait-for-lapi init container wait_for_lapi: From 7ccbee4fdfffb62ff87b0a9c0f583016d2997f12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9lian=20SAINT-BONNET?= Date: Fri, 1 Jul 2022 15:31:50 +0200 Subject: [PATCH 2/2] crowdsec: bump version to release new chart version --- charts/crowdsec/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/crowdsec/Chart.yaml b/charts/crowdsec/Chart.yaml index 7ef0522..91f95cd 100644 --- a/charts/crowdsec/Chart.yaml +++ b/charts/crowdsec/Chart.yaml @@ -43,7 +43,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.5.0 +version: 0.6.0 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to