Skip to content

[loki] Add template helper for single-binary#303

Open
jkroepke wants to merge 3 commits intografana-community:mainfrom
jkroepke:single-binary
Open

[loki] Add template helper for single-binary#303
jkroepke wants to merge 3 commits intografana-community:mainfrom
jkroepke:single-binary

Conversation

@jkroepke
Copy link
Copy Markdown
Member

@jkroepke jkroepke commented Apr 8, 2026

What this PR does / why we need it

Which issue this PR fixes

(optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged)

  • fixes #

Special notes for your reviewer

Checklist

  • DCO signed
  • Chart Version bumped
  • Title of the PR starts with chart name (e.g. [grafana])

@jkroepke jkroepke force-pushed the single-binary branch 3 times, most recently from a3dfcb6 to d7bf165 Compare April 8, 2026 22:56
Signed-off-by: Jan-Otto Kröpke <mail@jkroepke.de>
Signed-off-by: Jan-Otto Kröpke <mail@jkroepke.de>
{{- if ne $target "canary" }}
- -config.file=/etc/loki/config/config.yaml
- -target={{ $target }}{{- if and .Values.loki.ui.enabled (or (eq $target "read") (eq $target "query-frontend") (eq $target "querier")) }},ui{{- end }}
- -target={{ replace "single-binary" "all" $target }}{{- if and .Values.loki.ui.enabled (or (eq $target "read") (eq $target "query-frontend") (eq $target "querier")) }},ui{{- end }}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does all contains the ui target?

{{- else }}
- name: http-metrics
containerPort: 3100
containerPort: {{ .Values.loki.server.http_listen_port }}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we suddenly introducting _ instead of camel case here?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not introducing new things.

containerPort: {{ .Values.loki.server.http_listen_port }}

However, it makes sense, because the Loki configuration key is http_listen_port

# -- Number of replicas for the single binary
replicas: 0
# -- Whether to enable the rules sidecar
sidecar: true
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe this should be a separate pr so the changelog is easier to review?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is necessary to avoid an breaking Change.

The current condition is:

{{- if .Values.sidecar.rules.enabled }}

The current condition on the pod template is:

{{- if and $component.sidecar .Values.sidecar.rules.enabled }}
{{- include "loki.rulesSidecar" . | nindent 4 }}
{{- end }}

Without sidecar=true, the sidecar would be disappear.

Signed-off-by: Jan-Otto Kröpke <mail@jkroepke.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants