Skip to content

Commit

Permalink
fix(helm): only default bucket names when using minio
Browse files Browse the repository at this point in the history
this is to prevent people from accidentally sending their logs to an
unknown bucket when they provide cloud storage credentials without
overriding the default buckets.
  • Loading branch information
trevorwhitney committed Apr 9, 2024
1 parent c46c361 commit 13c031d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
4 changes: 2 additions & 2 deletions production/helm/loki/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ Generated storage config for loki common config
{{- if .Values.minio.enabled -}}
s3:
endpoint: {{ include "loki.minio" $ }}
bucketnames: {{ $.Values.loki.storage.bucketNames.chunks }}
bucketnames: chunks
secret_access_key: {{ $.Values.minio.rootPassword }}
access_key_id: {{ $.Values.minio.rootUser }}
s3forcepathstyle: true
Expand Down Expand Up @@ -346,7 +346,7 @@ Storage config for ruler
{{- if .Values.minio.enabled -}}
type: "s3"
s3:
bucketnames: {{ $.Values.loki.storage.bucketNames.ruler }}
bucketnames: ruler
{{- else if eq .Values.loki.storage.type "s3" -}}
{{- with .Values.loki.storage.s3 }}
type: "s3"
Expand Down
6 changes: 1 addition & 5 deletions production/helm/loki/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -311,10 +311,6 @@ loki:
compactor_address: '{{ include "loki.compactorAddress" . }}'
# -- Storage config. Providing this will automatically populate all necessary storage configs in the templated config.
storage:
bucketNames:
chunks: chunks
ruler: ruler
admin: admin
type: s3
s3:
s3: null
Expand Down Expand Up @@ -477,7 +473,7 @@ enterprise:
admin_client:
storage:
s3:
bucket_name: {{ .Values.loki.storage.bucketNames.admin }}
bucket_name: admin
{{- end }}
{{- end }}
auth:
Expand Down

0 comments on commit 13c031d

Please sign in to comment.