Skip to content

Commit

Permalink
feat(helm): Allow extraObject items as multiline strings (#12397)
Browse files Browse the repository at this point in the history
Co-authored-by: Michel Hollands <42814411+MichelHollands@users.noreply.github.com>
  • Loading branch information
TheRealNoob and MichelHollands committed Apr 30, 2024
1 parent c9b6604 commit af5be90
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 5 deletions.
4 changes: 4 additions & 0 deletions production/helm/loki/CHANGELOG.md
Expand Up @@ -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.)

## 6.4.0

- [ENHANCEMENT] Allow extraObject items as multiline strings, allowing for templating field names

## 6.3.4

- [BUGFIX] Add missing OTLP endpoint to nginx config
Expand Down
2 changes: 1 addition & 1 deletion production/helm/loki/Chart.yaml
Expand Up @@ -3,7 +3,7 @@ name: loki
description: Helm chart for Grafana Loki in simple, scalable mode
type: application
appVersion: 3.0.0
version: 6.3.4
version: 6.4.0
home: https://grafana.github.io/helm-charts
sources:
- https://github.com/grafana/loki
Expand Down
2 changes: 1 addition & 1 deletion production/helm/loki/README.md
@@ -1,6 +1,6 @@
# loki

![Version: 6.3.4](https://img.shields.io/badge/Version-6.3.4-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 3.0.0](https://img.shields.io/badge/AppVersion-3.0.0-informational?style=flat-square)
![Version: 6.4.0](https://img.shields.io/badge/Version-6.4.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 3.0.0](https://img.shields.io/badge/AppVersion-3.0.0-informational?style=flat-square)

Helm chart for Grafana Loki in simple, scalable mode

Expand Down
2 changes: 1 addition & 1 deletion production/helm/loki/templates/_helpers.tpl
Expand Up @@ -931,7 +931,7 @@ enableServiceLinks: false
{{/* Determine compactor address based on target configuration */}}
{{- define "loki.compactorAddress" -}}
{{- $isSimpleScalable := eq (include "loki.deployment.isScalable" .) "true" -}}
{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true "-}}
{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}}
{{- $isSingleBinary := eq (include "loki.deployment.isSingleBinary" .) "true" -}}
{{- $compactorAddress := include "loki.backendFullname" . -}}
{{- if and $isSimpleScalable .Values.read.legacyReadTarget -}}
Expand Down
8 changes: 6 additions & 2 deletions production/helm/loki/templates/extra-manifests.yaml
@@ -1,4 +1,8 @@
{{ range .Values.extraObjects }}
{{- range .Values.extraObjects -}}
---
{{- if kindIs "map" . }}
{{ tpl (toYaml .) $ }}
{{ end }}
{{- else }}
{{ tpl . $ }}
{{- end }}
{{- end }}
12 changes: 12 additions & 0 deletions production/helm/loki/values.yaml
Expand Up @@ -3086,6 +3086,7 @@ minio:
# Allow the address used by Loki to refer to Minio to be overridden
address: null
# Create extra manifests via values. Would be passed through `tpl` for templating
# objects can also be provided as multiline strings, useful for templating field names
extraObjects: []
# - apiVersion: v1
# kind: ConfigMap
Expand All @@ -3105,6 +3106,17 @@ extraObjects: []
# category: logs
# annotations:
# message: "loki has encountered errors"
# - |
# apiVersion: v1
# kind: Secret
# type: Opaque
# metadata:
# name: loki-distributed-basic-auth
# data:
# {{- range .Values.loki.tenants }}
# {{ .name }}: {{ b64enc .password | quote }}
# {{- end }}


sidecar:
image:
Expand Down

0 comments on commit af5be90

Please sign in to comment.