Skip to content

Commit 956ddd4

Browse files
committed
fix(helm): do not mark loki.storage.bucketNames.chunks as required, if an s3 url is provided
Signed-off-by: Jan-Otto Kröpke <[email protected]>
1 parent a2c4ea6 commit 956ddd4

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

production/helm/loki/CHANGELOG.md

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

1414
## Unreleased
1515

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)
1617

1718
## 6.46.0
1819

production/helm/loki/templates/_helpers.tpl

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

0 commit comments

Comments
 (0)