Skip to content

Commit 0d2ab2d

Browse files
[grafana] Add support for spec.trafficDistribution in Service (#70)
* feat: add grafana traffic distribution support Signed-off-by: Nathan Mittelette <mittelette.nathan@gmail.com> * Apply suggestion from @jkroepke Signed-off-by: Jan-Otto Kröpke <mail@jkroepke.de> --------- Signed-off-by: Nathan Mittelette <mittelette.nathan@gmail.com> Signed-off-by: Jan-Otto Kröpke <mail@jkroepke.de> Co-authored-by: Jan-Otto Kröpke <mail@jkroepke.de>
1 parent 3720233 commit 0d2ab2d

4 files changed

Lines changed: 8 additions & 1 deletion

File tree

charts/grafana/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
apiVersion: v2
22
name: grafana
3-
version: 11.0.1
3+
version: 11.1.0
44
# renovate: docker=docker.io/grafana/grafana
55
appVersion: 12.3.2
66
kubeVersion: "^1.25.0-0"

charts/grafana/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,7 @@ The minimum required Kubernetes version is now 1.25. All references to deprecate
298298
| service.portName | string | `"service"` | |
299299
| service.sessionAffinity | string | `""` | |
300300
| service.targetPort | int | `3000` | |
301+
| service.trafficDistribution | string | `""` | |
301302
| service.type | string | `"ClusterIP"` | |
302303
| serviceAccount.automountServiceAccountToken | bool | `false` | |
303304
| serviceAccount.create | bool | `true` | |

charts/grafana/templates/service.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ spec:
5151
{{- with .Values.service.sessionAffinity }}
5252
sessionAffinity: {{ . }}
5353
{{- end }}
54+
{{- with .Values.service.trafficDistribution }}
55+
trafficDistribution: {{ . }}
56+
{{- end }}
5457
ports:
5558
- name: {{ .Values.service.portName }}
5659
port: {{ .Values.service.port }}

charts/grafana/values.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,9 @@ service:
250250
# Adds the appProtocol field to the service. This allows to work with istio protocol selection. Ex: "http" or "tcp"
251251
appProtocol: ""
252252
sessionAffinity: ""
253+
# trafficDistribution allows specifying how traffic is distributed to Service endpoints.
254+
# Valid values: "" (default - standard load balancing),"PreferSameZone" (K8s 1.34+), "PreferSameNode" (K8s 1.35+), "PreferClose" (deprecated, use PreferSameZone),
255+
trafficDistribution: ""
253256

254257
serviceMonitor:
255258
## If true, a ServiceMonitor CR is created for a prometheus operator

0 commit comments

Comments
 (0)