From d26ecfdc9c50fc23e4577ca58cdf1b9401c60cb8 Mon Sep 17 00:00:00 2001 From: xylogenw376dq <115647096+xylogenw376dq@users.noreply.github.com> Date: Wed, 18 Dec 2024 19:57:51 +0300 Subject: [PATCH] Only use internalTrafficPolicy: if on Kubernetes vesrion 1.26 or later (#7071) * Only use internalTrafficPolicy: if on Kubernetes vesrion 1.26 or later Same issue as in https://github.com/grafana/alloy/issues/1212 * Update CHANGELOG.md * Move changelog entry to "main" --------- Co-authored-by: Paulin Todev --- operations/helm/charts/grafana-agent/CHANGELOG.md | 6 ++++++ operations/helm/charts/grafana-agent/templates/service.yaml | 2 ++ 2 files changed, 8 insertions(+) diff --git a/operations/helm/charts/grafana-agent/CHANGELOG.md b/operations/helm/charts/grafana-agent/CHANGELOG.md index c4c912e7ef85..0b301433ec79 100644 --- a/operations/helm/charts/grafana-agent/CHANGELOG.md +++ b/operations/helm/charts/grafana-agent/CHANGELOG.md @@ -7,6 +7,12 @@ This document contains a historical list of changes between releases. Only changes that impact end-user behavior are listed; changes to documentation or internal API changes are not present. + +Main (unreleased) +---------- + +- Only utilize spec.internalTrafficPolicy in the Service if deploying to Kubernetes 1.26 or later. (@xylogenw376dq) + 0.43.3 (2024-09-26) ---------- diff --git a/operations/helm/charts/grafana-agent/templates/service.yaml b/operations/helm/charts/grafana-agent/templates/service.yaml index 34427f822ac0..a6dc7b16f113 100644 --- a/operations/helm/charts/grafana-agent/templates/service.yaml +++ b/operations/helm/charts/grafana-agent/templates/service.yaml @@ -16,7 +16,9 @@ spec: {{- end }} selector: {{- include "grafana-agent.selectorLabels" . | nindent 4 }} + {{- if semverCompare ">=1.26-0" .Capabilities.KubeVersion.Version }} internalTrafficPolicy: {{.Values.service.internalTrafficPolicy}} + {{- end }} ports: - name: http-metrics {{- if eq .Values.service.type "NodePort" }}