Skip to content

Commit e9951bb

Browse files
fix(helm): do not mark loki.storage.bucketNames.chunks as required, if an s3 url is provided (#19873)
Signed-off-by: Jan-Otto Kröpke <[email protected]> Signed-off-by: Jay Clifford <[email protected]> Co-authored-by: Jay Clifford <[email protected]>
1 parent d6147d8 commit e9951bb

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

production/helm/loki/CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Entries should include a reference to the pull request that introduced the chang
1313

1414
## Unreleased
1515

16-
16+
- [BUGFIX] Don't mark loki.storage.bucketNames.chunks as required, if an s3 url is provided. [#19873](https://github.com/grafana/loki/pull/19873)
1717
- [BUGFIX] Do not mark loki.storage.bucketNames.chunks as required, if minio is used. [#19871](https://github.com/grafana/loki/pull/19871)
1818
- [ENHANCEMENT] Use fsGroupChangePolicy=OnRootMismatch on loki to speed up pod starts [#13942](https://github.com/grafana/loki/pull/13942)
1919
- [ENHANCEMENT] Add support for configuring `volumeAttributesClassName` for `volumeClaimTemplates`. [#19719](https://github.com/grafana/loki/pull/19719)

production/helm/loki/templates/_helpers.tpl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,10 @@ s3:
216216
s3forcepathstyle: true
217217
insecure: true
218218
{{- else if (eq (include "loki.isUsingObjectStorage" . ) "true") -}}
219-
{{- $bucketName := required "Please define loki.storage.bucketNames.chunks" (dig "storage" "bucketNames" "chunks" "" .Values.loki) }}
219+
{{- $bucketName := "" }}
220+
{{- if not (or (dig "aws" "s3" "" .Values.loki.storage_config) (dig "aws" "bucketnames" "" .Values.loki.storage_config)) -}}
221+
{{- $bucketName = required "Please define loki.storage.bucketNames.chunks" (dig "storage" "bucketNames" "chunks" "" .Values.loki) }}
222+
{{- end -}}
220223
{{- include "loki.lokiStorageConfig" (dict "ctx" . "bucketName" $bucketName) | nindent 0 }}
221224
{{- else if .Values.loki.storage.filesystem }}
222225
filesystem:

0 commit comments

Comments
 (0)