diff --git a/CHANGELOG.md b/CHANGELOG.md index b8fddc84..c1f94aad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## master / unreleased +* [FEATURE] Add trafficDistribution attribute to services #674 + ## 3.4.0 / 2026-09-21 * [FEATURE] Add remote-write OTLP endpoint in nginx #667 diff --git a/README.md b/README.md index 53243545..a68cb5e8 100644 --- a/README.md +++ b/README.md @@ -129,6 +129,7 @@ Kubernetes: `^1.19.0-0` | alertmanager.​securityContext | object | `{}` | | | alertmanager.​service.​annotations | object | `{}` | | | alertmanager.​service.​labels | object | `{}` | | +| alertmanager.​service.​trafficDistribution | string | `""` | | | alertmanager.​serviceAccount.​name | string | `""` | "" disables the individual serviceAccount and uses the global serviceAccount for that component | | alertmanager.​serviceMonitor.​additionalLabels | object | `{}` | | | alertmanager.​serviceMonitor.​enabled | bool | `false` | | @@ -299,6 +300,7 @@ Kubernetes: `^1.19.0-0` | distributor.​securityContext | object | `{}` | | | distributor.​service.​annotations | object | `{}` | | | distributor.​service.​labels | object | `{}` | | +| distributor.​service.​trafficDistribution | string | `""` | | | distributor.​serviceAccount.​name | string | `""` | "" disables the individual serviceAccount and uses the global serviceAccount for that component | | distributor.​serviceMonitor.​additionalLabels | object | `{}` | | | distributor.​serviceMonitor.​enabled | bool | `false` | | @@ -746,6 +748,7 @@ Kubernetes: `^1.19.0-0` | query_frontend.​securityContext | object | `{}` | | | query_frontend.​service.​annotations | object | `{}` | | | query_frontend.​service.​labels | object | `{}` | | +| query_frontend.​service.​trafficDistribution | string | `""` | | | query_frontend.​serviceAccount.​name | string | `""` | "" disables the individual serviceAccount and uses the global serviceAccount for that component | | query_frontend.​serviceMonitor.​additionalLabels | object | `{}` | | | query_frontend.​serviceMonitor.​enabled | bool | `false` | | @@ -844,6 +847,7 @@ Kubernetes: `^1.19.0-0` | ruler.​securityContext | object | `{}` | | | ruler.​service.​annotations | object | `{}` | | | ruler.​service.​labels | object | `{}` | | +| ruler.​service.​trafficDistribution | string | `""` | | | ruler.​serviceAccount.​name | string | `""` | "" disables the individual serviceAccount and uses the global serviceAccount for that component | | ruler.​serviceMonitor.​additionalLabels | object | `{}` | | | ruler.​serviceMonitor.​enabled | bool | `false` | | diff --git a/templates/alertmanager/alertmanager-svc.yaml b/templates/alertmanager/alertmanager-svc.yaml index 35f4cc33..5ba60356 100644 --- a/templates/alertmanager/alertmanager-svc.yaml +++ b/templates/alertmanager/alertmanager-svc.yaml @@ -20,4 +20,7 @@ spec: targetPort: http-metrics selector: {{- include "cortex.alertmanagerSelectorLabels" . | nindent 4 }} + {{- with .Values.alertmanager.service.trafficDistribution }} + trafficDistribution: {{ . }} + {{- end }} {{- end -}} diff --git a/templates/distributor/distributor-svc.yaml b/templates/distributor/distributor-svc.yaml index 451740ac..b0a36eb0 100644 --- a/templates/distributor/distributor-svc.yaml +++ b/templates/distributor/distributor-svc.yaml @@ -20,4 +20,7 @@ spec: targetPort: http-metrics selector: {{- include "cortex.distributorSelectorLabels" . | nindent 4 }} -{{- end }} \ No newline at end of file + {{- with .Values.distributor.service.trafficDistribution }} + trafficDistribution: {{ . }} + {{- end }} +{{- end }} diff --git a/templates/nginx/nginx-svc.yaml b/templates/nginx/nginx-svc.yaml index a7b00327..801faf91 100644 --- a/templates/nginx/nginx-svc.yaml +++ b/templates/nginx/nginx-svc.yaml @@ -20,4 +20,7 @@ spec: targetPort: http-metrics selector: {{- include "cortex.nginxSelectorLabels" . | nindent 4 }} + {{- with .Values.nginx.service.trafficDistribution }} + trafficDistribution: {{ . }} + {{- end }} {{- end }} diff --git a/templates/query-frontend/query-frontend-svc.yaml b/templates/query-frontend/query-frontend-svc.yaml index 9f0c8f1b..5c138ed2 100644 --- a/templates/query-frontend/query-frontend-svc.yaml +++ b/templates/query-frontend/query-frontend-svc.yaml @@ -24,4 +24,7 @@ spec: targetPort: grpc selector: {{- include "cortex.queryFrontendSelectorLabels" . | nindent 4 }} + {{- with .Values.query_frontend.service.trafficDistribution }} + trafficDistribution: {{ . }} + {{- end }} {{- end -}} diff --git a/templates/ruler/ruler-svc.yaml b/templates/ruler/ruler-svc.yaml index 7752ef42..79df3ff9 100644 --- a/templates/ruler/ruler-svc.yaml +++ b/templates/ruler/ruler-svc.yaml @@ -20,4 +20,7 @@ spec: targetPort: http-metrics selector: {{- include "cortex.rulerSelectorLabels" . | nindent 4 }} + {{- with .Values.ruler.service.trafficDistribution }} + trafficDistribution: {{ . }} + {{- end }} {{- end }} diff --git a/values.yaml b/values.yaml index 39611289..10afadd8 100644 --- a/values.yaml +++ b/values.yaml @@ -155,6 +155,7 @@ alertmanager: service: annotations: {} labels: {} + trafficDistribution: "" serviceAccount: # -- "" disables the individual serviceAccount and uses the global serviceAccount for that component @@ -337,6 +338,7 @@ distributor: service: annotations: {} labels: {} + trafficDistribution: "" serviceAccount: # -- "" disables the individual serviceAccount and uses the global serviceAccount for that component @@ -636,6 +638,7 @@ ruler: service: annotations: {} labels: {} + trafficDistribution: "" serviceAccount: # -- "" disables the individual serviceAccount and uses the global serviceAccount for that component @@ -897,6 +900,7 @@ query_frontend: service: annotations: {} labels: {} + trafficDistribution: "" serviceAccount: # -- "" disables the individual serviceAccount and uses the global serviceAccount for that component