Skip to content

Commit

Permalink
Only use internalTrafficPolicy: if on Kubernetes vesrion 1.26 or later (
Browse files Browse the repository at this point in the history
#1213)

Signed-off-by: Pete Wall <[email protected]>
  • Loading branch information
petewall authored Jul 5, 2024
1 parent 2188873 commit 3417a2a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions operations/helm/charts/alloy/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ internal API changes are not present.
Unreleased
----------

### Enhancements

- Only utilize spec.internalTrafficPolicy in the Service if deploying to Kubernetes 1.26 or later. (@petewall)

0.4.0 (2024-06-26)
------------------

Expand Down
2 changes: 2 additions & 0 deletions operations/helm/charts/alloy/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ spec:
{{- end }}
selector:
{{- include "alloy.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" }}
Expand Down

0 comments on commit 3417a2a

Please sign in to comment.