feat: area/helm: Modified helm template to use http_listen_port and grpc_listen_port instead of hardcoded value (#11646)

Signed-off-by: Sheikh-Abubaker <sheikhabubaker761@gmail.com>
Co-authored-by: Alberto Chiusole <chiusole@seqera.io>
Co-authored-by: Michel Hollands <42814411+MichelHollands@users.noreply.github.com>
pull/12131/head^2 helm-loki-5.44.0
Sheikh-Abubaker 1 year ago committed by GitHub
parent 4ce5fa8954
commit 347fd4dfa3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 4
      production/helm/loki/CHANGELOG.md
  2. 2
      production/helm/loki/Chart.yaml
  3. 2
      production/helm/loki/README.md
  4. 14
      production/helm/loki/templates/_helpers.tpl
  5. 4
      production/helm/loki/templates/backend/query-scheduler-discovery.yaml
  6. 4
      production/helm/loki/templates/backend/service-backend-headless.yaml
  7. 4
      production/helm/loki/templates/backend/service-backend.yaml
  8. 4
      production/helm/loki/templates/backend/statefulset-backend.yaml
  9. 4
      production/helm/loki/templates/monitoring/_helpers-monitoring.tpl
  10. 6
      production/helm/loki/templates/read/deployment-read.yaml
  11. 4
      production/helm/loki/templates/read/service-read-headless.yaml
  12. 4
      production/helm/loki/templates/read/service-read.yaml
  13. 4
      production/helm/loki/templates/read/statefulset-read.yaml
  14. 2
      production/helm/loki/templates/single-binary/service-headless.yaml
  15. 4
      production/helm/loki/templates/single-binary/service.yaml
  16. 4
      production/helm/loki/templates/single-binary/statefulset.yaml
  17. 4
      production/helm/loki/templates/table-manager/deployment-table-manager.yaml
  18. 4
      production/helm/loki/templates/table-manager/service-table-manager.yaml
  19. 4
      production/helm/loki/templates/write/service-write-headless.yaml
  20. 4
      production/helm/loki/templates/write/service-write.yaml
  21. 4
      production/helm/loki/templates/write/statefulset-write.yaml

@ -13,6 +13,10 @@ Entries should include a reference to the pull request that introduced the chang
[//]: # (<AUTOMATED_UPDATES_LOCATOR> : 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

@ -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

@ -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

@ -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 }}

@ -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:

@ -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:

@ -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:

@ -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

@ -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 -}}

@ -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

@ -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

@ -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:

@ -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

@ -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:

@ -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:

@ -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

@ -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:

@ -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:

@ -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

@ -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:

@ -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

Loading…
Cancel
Save