diff --git a/production/helm/loki/CHANGELOG.md b/production/helm/loki/CHANGELOG.md index 2e372fe1d1ff..54293fc95598 100644 --- a/production/helm/loki/CHANGELOG.md +++ b/production/helm/loki/CHANGELOG.md @@ -13,6 +13,10 @@ Entries should include a reference to the pull request that introduced the chang [//]: # ( : do not remove this line. This locator is used by the CI pipeline to automatically create a changelog entry for each new Loki release. Add other chart versions and respective changelog entries bellow this line.) +## 5.44.0 + +- [FEATURE] Modified helm template to use parameters http_listen_port and grpc_listen_port instead of hardcoded values. + ## 5.43.7 - [BUGFIX] allow to configure http_config for ruler diff --git a/production/helm/loki/Chart.yaml b/production/helm/loki/Chart.yaml index 025037f88880..e8eec882ec4f 100644 --- a/production/helm/loki/Chart.yaml +++ b/production/helm/loki/Chart.yaml @@ -3,7 +3,7 @@ name: loki description: Helm chart for Grafana Loki in simple, scalable mode type: application appVersion: 2.9.4 -version: 5.43.7 +version: 5.44.0 home: https://grafana.github.io/helm-charts sources: - https://github.com/grafana/loki diff --git a/production/helm/loki/README.md b/production/helm/loki/README.md index 46c31bb2410b..3bbdb2fdb751 100644 --- a/production/helm/loki/README.md +++ b/production/helm/loki/README.md @@ -1,6 +1,6 @@ # loki -![Version: 5.43.7](https://img.shields.io/badge/Version-5.43.7-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.9.4](https://img.shields.io/badge/AppVersion-2.9.4-informational?style=flat-square) +![Version: 5.44.0](https://img.shields.io/badge/Version-5.44.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.9.4](https://img.shields.io/badge/AppVersion-2.9.4-informational?style=flat-square) Helm chart for Grafana Loki in simple, scalable mode diff --git a/production/helm/loki/templates/_helpers.tpl b/production/helm/loki/templates/_helpers.tpl index 06884953103f..ccd5f1725178 100644 --- a/production/helm/loki/templates/_helpers.tpl +++ b/production/helm/loki/templates/_helpers.tpl @@ -567,10 +567,10 @@ Params: service: name: {{ $serviceName }} port: - number: 3100 + number: {{ .Values.loki.server.http_listen_port }} {{- else }} serviceName: {{ $serviceName }} - servicePort: 3100 + servicePort: {{ .Values.loki.server.http_listen_port }} {{- end -}} {{- end -}} {{- end -}} @@ -613,7 +613,7 @@ Create the service endpoint including port for MinIO. {{- $isSingleBinary := eq (include "loki.deployment.isSingleBinary" .) "true" -}} {{- $url := printf "%s.%s.svc.%s.:%s" (include "loki.gatewayFullname" .) .Release.Namespace .Values.global.clusterDomain (.Values.gateway.service.port | toString) }} {{- if and $isSingleBinary (not .Values.gateway.enabled) }} - {{- $url = printf "%s.%s.svc.%s.:3100" (include "loki.singleBinaryFullname" .) .Release.Namespace .Values.global.clusterDomain }} + {{- $url = printf "%s.%s.svc.%s.:%s" (include "loki.singleBinaryFullname" .) .Release.Namespace .Values.global.clusterDomain (.Values.loki.server.http_listen_port | toString) }} {{- end }} {{- printf "%s" $url -}} {{- end -}} @@ -726,9 +726,9 @@ http { {{- $writeHost = include "loki.singleBinaryFullname" .}} {{- end }} - {{- $writeUrl := printf "http://%s.%s.svc.%s:3100" $writeHost .Release.Namespace .Values.global.clusterDomain }} - {{- $readUrl := printf "http://%s.%s.svc.%s:3100" $readHost .Release.Namespace .Values.global.clusterDomain }} - {{- $backendUrl := printf "http://%s.%s.svc.%s:3100" $backendHost .Release.Namespace .Values.global.clusterDomain }} + {{- $writeUrl := printf "http://%s.%s.svc.%s:%s" $writeHost .Release.Namespace .Values.global.clusterDomain (.Values.loki.server.http_listen_port | toString) }} + {{- $readUrl := printf "http://%s.%s.svc.%s:%s" $readHost .Release.Namespace .Values.global.clusterDomain (.Values.loki.server.http_listen_port | toString) }} + {{- $backendUrl := printf "http://%s.%s.svc.%s:%s" $backendHost .Release.Namespace .Values.global.clusterDomain (.Values.loki.server.http_listen_port | toString) }} {{- if .Values.gateway.nginxConfig.customWriteUrl }} {{- $writeUrl = .Values.gateway.nginxConfig.customWriteUrl }} @@ -896,7 +896,7 @@ enableServiceLinks: false {{- $isSimpleScalable := eq (include "loki.deployment.isScalable" .) "true" -}} {{- $schedulerAddress := ""}} {{- if and $isSimpleScalable (not .Values.read.legacyReadTarget ) -}} -{{- $schedulerAddress = printf "query-scheduler-discovery.%s.svc.%s.:9095" .Release.Namespace .Values.global.clusterDomain -}} +{{- $schedulerAddress = printf "query-scheduler-discovery.%s.svc.%s.:%s" .Release.Namespace .Values.global.clusterDomain (.Values.loki.server.grpc_listen_port | toString) -}} {{- end -}} {{- printf "%s" $schedulerAddress }} {{- end }} diff --git a/production/helm/loki/templates/backend/query-scheduler-discovery.yaml b/production/helm/loki/templates/backend/query-scheduler-discovery.yaml index a9dedbb54564..527fa13cfa49 100644 --- a/production/helm/loki/templates/backend/query-scheduler-discovery.yaml +++ b/production/helm/loki/templates/backend/query-scheduler-discovery.yaml @@ -15,11 +15,11 @@ spec: publishNotReadyAddresses: true ports: - name: http-metrics - port: 3100 + port: {{ .Values.loki.server.http_listen_port }} targetPort: http-metrics protocol: TCP - name: grpc - port: 9095 + port: {{ .Values.loki.server.grpc_listen_port }} targetPort: grpc protocol: TCP selector: diff --git a/production/helm/loki/templates/backend/service-backend-headless.yaml b/production/helm/loki/templates/backend/service-backend-headless.yaml index 2ed4a9ae18c6..0755be66d5fe 100644 --- a/production/helm/loki/templates/backend/service-backend-headless.yaml +++ b/production/helm/loki/templates/backend/service-backend-headless.yaml @@ -28,11 +28,11 @@ spec: clusterIP: None ports: - name: http-metrics - port: 3100 + port: {{ .Values.loki.server.http_listen_port }} targetPort: http-metrics protocol: TCP - name: grpc - port: 9095 + port: {{ .Values.loki.server.grpc_listen_port }} targetPort: grpc protocol: TCP selector: diff --git a/production/helm/loki/templates/backend/service-backend.yaml b/production/helm/loki/templates/backend/service-backend.yaml index 47af89e148cc..cd1bd3b9b69d 100644 --- a/production/helm/loki/templates/backend/service-backend.yaml +++ b/production/helm/loki/templates/backend/service-backend.yaml @@ -25,11 +25,11 @@ spec: type: ClusterIP ports: - name: http-metrics - port: 3100 + port: {{ .Values.loki.server.http_listen_port }} targetPort: http-metrics protocol: TCP - name: grpc - port: 9095 + port: {{ .Values.loki.server.grpc_listen_port }} targetPort: grpc protocol: TCP selector: diff --git a/production/helm/loki/templates/backend/statefulset-backend.yaml b/production/helm/loki/templates/backend/statefulset-backend.yaml index 1b1be055f626..97e110ea2d54 100644 --- a/production/helm/loki/templates/backend/statefulset-backend.yaml +++ b/production/helm/loki/templates/backend/statefulset-backend.yaml @@ -161,10 +161,10 @@ spec: {{- end }} ports: - name: http-metrics - containerPort: 3100 + containerPort: {{ .Values.loki.server.http_listen_port }} protocol: TCP - name: grpc - containerPort: 9095 + containerPort: {{ .Values.loki.server.grpc_listen_port }} protocol: TCP - name: http-memberlist containerPort: 7946 diff --git a/production/helm/loki/templates/monitoring/_helpers-monitoring.tpl b/production/helm/loki/templates/monitoring/_helpers-monitoring.tpl index e54f13004d34..5a8e8b2ce417 100644 --- a/production/helm/loki/templates/monitoring/_helpers-monitoring.tpl +++ b/production/helm/loki/templates/monitoring/_helpers-monitoring.tpl @@ -3,9 +3,9 @@ Client definition for LogsInstance */}} {{- define "loki.logsInstanceClient" -}} {{- $isSingleBinary := eq (include "loki.deployment.isSingleBinary" .) "true" -}} -{{- $url := printf "http://%s.%s.svc.%s:3100/loki/api/v1/push" (include "loki.writeFullname" .) .Release.Namespace .Values.global.clusterDomain }} +{{- $url := printf "http://%s.%s.svc.%s:%s/loki/api/v1/push" (include "loki.writeFullname" .) .Release.Namespace .Values.global.clusterDomain .Values.loki.server.http_listen_port }} {{- if $isSingleBinary }} - {{- $url = printf "http://%s.%s.svc.%s:3100/loki/api/v1/push" (include "loki.singleBinaryFullname" .) .Release.Namespace .Values.global.clusterDomain }} + {{- $url = printf "http://%s.%s.svc.%s:%s/loki/api/v1/push" (include "loki.singleBinaryFullname" .) .Release.Namespace .Values.global.clusterDomain .Values.loki.server.http_listen_port }} {{- else if .Values.gateway.enabled -}} {{- $url = printf "http://%s.%s.svc.%s/loki/api/v1/push" (include "loki.gatewayFullname" .) .Release.Namespace .Values.global.clusterDomain }} {{- end -}} diff --git a/production/helm/loki/templates/read/deployment-read.yaml b/production/helm/loki/templates/read/deployment-read.yaml index a5e7524f2a05..dbe8f531ed18 100644 --- a/production/helm/loki/templates/read/deployment-read.yaml +++ b/production/helm/loki/templates/read/deployment-read.yaml @@ -71,16 +71,16 @@ spec: - -config.file=/etc/loki/config/config.yaml - -target={{ .Values.read.targetModule }} - -legacy-read-mode=false - - -common.compactor-grpc-address={{ include "loki.backendFullname" . }}.{{ .Release.Namespace }}.svc.{{ .Values.global.clusterDomain }}:9095 + - -common.compactor-grpc-address={{ include "loki.backendFullname" . }}.{{ .Release.Namespace }}.svc.{{ .Values.global.clusterDomain }}:{{ .Values.loki.server.grpc_listen_port }} {{- with .Values.read.extraArgs }} {{- toYaml . | nindent 12 }} {{- end }} ports: - name: http-metrics - containerPort: 3100 + containerPort: {{ .Values.loki.server.http_listen_port }} protocol: TCP - name: grpc - containerPort: 9095 + containerPort: {{ .Values.loki.server.grpc_listen_port }} protocol: TCP - name: http-memberlist containerPort: 7946 diff --git a/production/helm/loki/templates/read/service-read-headless.yaml b/production/helm/loki/templates/read/service-read-headless.yaml index e3c440082b4f..14ba0f62f9f8 100644 --- a/production/helm/loki/templates/read/service-read-headless.yaml +++ b/production/helm/loki/templates/read/service-read-headless.yaml @@ -28,11 +28,11 @@ spec: clusterIP: None ports: - name: http-metrics - port: 3100 + port: {{ .Values.loki.server.http_listen_port }} targetPort: http-metrics protocol: TCP - name: grpc - port: 9095 + port: {{ .Values.loki.server.grpc_listen_port }} targetPort: grpc protocol: TCP appProtocol: tcp diff --git a/production/helm/loki/templates/read/service-read.yaml b/production/helm/loki/templates/read/service-read.yaml index b7306edc058d..f4000fda5720 100644 --- a/production/helm/loki/templates/read/service-read.yaml +++ b/production/helm/loki/templates/read/service-read.yaml @@ -25,11 +25,11 @@ spec: type: ClusterIP ports: - name: http-metrics - port: 3100 + port: {{ .Values.loki.server.http_listen_port }} targetPort: http-metrics protocol: TCP - name: grpc - port: 9095 + port: {{ .Values.loki.server.grpc_listen_port }} targetPort: grpc protocol: TCP selector: diff --git a/production/helm/loki/templates/read/statefulset-read.yaml b/production/helm/loki/templates/read/statefulset-read.yaml index eaea4aaecbc2..e0fd2c102975 100644 --- a/production/helm/loki/templates/read/statefulset-read.yaml +++ b/production/helm/loki/templates/read/statefulset-read.yaml @@ -86,10 +86,10 @@ spec: {{- end }} ports: - name: http-metrics - containerPort: 3100 + containerPort: {{ .Values.loki.server.http_listen_port }} protocol: TCP - name: grpc - containerPort: 9095 + containerPort: {{ .Values.loki.server.grpc_listen_port }} protocol: TCP - name: http-memberlist containerPort: 7946 diff --git a/production/helm/loki/templates/single-binary/service-headless.yaml b/production/helm/loki/templates/single-binary/service-headless.yaml index 51e111982b95..7522240afc72 100644 --- a/production/helm/loki/templates/single-binary/service-headless.yaml +++ b/production/helm/loki/templates/single-binary/service-headless.yaml @@ -27,7 +27,7 @@ spec: clusterIP: None ports: - name: http-metrics - port: 3100 + port: {{ .Values.loki.server.http_listen_port }} targetPort: http-metrics protocol: TCP selector: diff --git a/production/helm/loki/templates/single-binary/service.yaml b/production/helm/loki/templates/single-binary/service.yaml index 1dee4eba8a6f..352fcadf96cc 100644 --- a/production/helm/loki/templates/single-binary/service.yaml +++ b/production/helm/loki/templates/single-binary/service.yaml @@ -25,11 +25,11 @@ spec: type: ClusterIP ports: - name: http-metrics - port: 3100 + port: {{ .Values.loki.server.http_listen_port }} targetPort: http-metrics protocol: TCP - name: grpc - port: 9095 + port: {{ .Values.loki.server.grpc_listen_port }} targetPort: grpc protocol: TCP selector: diff --git a/production/helm/loki/templates/single-binary/statefulset.yaml b/production/helm/loki/templates/single-binary/statefulset.yaml index 96c8974b72c2..8922c89ab33a 100644 --- a/production/helm/loki/templates/single-binary/statefulset.yaml +++ b/production/helm/loki/templates/single-binary/statefulset.yaml @@ -90,10 +90,10 @@ spec: {{- end }} ports: - name: http-metrics - containerPort: 3100 + containerPort: {{ .Values.loki.server.http_listen_port }} protocol: TCP - name: grpc - containerPort: 9095 + containerPort: {{ .Values.loki.server.grpc_listen_port }} protocol: TCP - name: http-memberlist containerPort: 7946 diff --git a/production/helm/loki/templates/table-manager/deployment-table-manager.yaml b/production/helm/loki/templates/table-manager/deployment-table-manager.yaml index bc14d1f6df49..aeb5b1affea5 100644 --- a/production/helm/loki/templates/table-manager/deployment-table-manager.yaml +++ b/production/helm/loki/templates/table-manager/deployment-table-manager.yaml @@ -58,10 +58,10 @@ spec: {{- end }} ports: - name: http-metrics - containerPort: 3100 + containerPort: {{ .Values.loki.server.http_listen_port }} protocol: TCP - name: grpc - containerPort: 9095 + containerPort: {{ .Values.loki.server.grpc_listen_port }} protocol: TCP {{- with .Values.tableManager.extraEnv }} env: diff --git a/production/helm/loki/templates/table-manager/service-table-manager.yaml b/production/helm/loki/templates/table-manager/service-table-manager.yaml index 43443fb57550..214cd3663e02 100644 --- a/production/helm/loki/templates/table-manager/service-table-manager.yaml +++ b/production/helm/loki/templates/table-manager/service-table-manager.yaml @@ -23,11 +23,11 @@ spec: type: ClusterIP ports: - name: http-metrics - port: 3100 + port: {{ .Values.loki.server.http_listen_port }} targetPort: http-metrics protocol: TCP - name: grpc - port: 9095 + port: {{ .Values.loki.server.grpc_listen_port }} targetPort: grpc protocol: TCP selector: diff --git a/production/helm/loki/templates/write/service-write-headless.yaml b/production/helm/loki/templates/write/service-write-headless.yaml index 71cdcb7b2db8..84cf5d7b178f 100644 --- a/production/helm/loki/templates/write/service-write-headless.yaml +++ b/production/helm/loki/templates/write/service-write-headless.yaml @@ -28,11 +28,11 @@ spec: clusterIP: None ports: - name: http-metrics - port: 3100 + port: {{ .Values.loki.server.http_listen_port }} targetPort: http-metrics protocol: TCP - name: grpc - port: 9095 + port: {{ .Values.loki.server.grpc_listen_port }} targetPort: grpc protocol: TCP appProtocol: tcp diff --git a/production/helm/loki/templates/write/service-write.yaml b/production/helm/loki/templates/write/service-write.yaml index 35a548c0330c..9603706e6f1e 100644 --- a/production/helm/loki/templates/write/service-write.yaml +++ b/production/helm/loki/templates/write/service-write.yaml @@ -25,11 +25,11 @@ spec: type: ClusterIP ports: - name: http-metrics - port: 3100 + port: {{ .Values.loki.server.http_listen_port }} targetPort: http-metrics protocol: TCP - name: grpc - port: 9095 + port: {{ .Values.loki.server.grpc_listen_port }} targetPort: grpc protocol: TCP selector: diff --git a/production/helm/loki/templates/write/statefulset-write.yaml b/production/helm/loki/templates/write/statefulset-write.yaml index ca67038a1619..5aa1e78eaf58 100644 --- a/production/helm/loki/templates/write/statefulset-write.yaml +++ b/production/helm/loki/templates/write/statefulset-write.yaml @@ -92,10 +92,10 @@ spec: {{- end }} ports: - name: http-metrics - containerPort: 3100 + containerPort: {{ .Values.loki.server.http_listen_port }} protocol: TCP - name: grpc - containerPort: 9095 + containerPort: {{ .Values.loki.server.grpc_listen_port }} protocol: TCP - name: http-memberlist containerPort: 7946