Skip to content

Commit

Permalink
feat: remove deprecated storage option for loki and GCS (#1556)
Browse files Browse the repository at this point in the history
Co-authored-by: Matthias Erll <matthias.erll@redkubes.com>
  • Loading branch information
j-zimnowoda and Matthias Erll authored Mar 25, 2024
1 parent c8b5c36 commit d0738e6
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 12 deletions.
5 changes: 5 additions & 0 deletions values-changes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -124,3 +124,8 @@ changes:
- 'apps.argocd.enabled'
- version: 20
networkPoliciesMigration: true
additions:
- 'apps.loki.storage.gcs.serviceAccount'
deletions:
- 'apps.loki.storage.gcs.project'
- 'apps.loki.storage.gcs.instance'
5 changes: 2 additions & 3 deletions values-schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2552,6 +2552,7 @@ properties:
required:
- duration
storage:
description: 'Chunk storage'
properties:
azure:
properties:
Expand Down Expand Up @@ -2582,9 +2583,7 @@ properties:
properties:
bucket:
$ref: '#/definitions/wordCharacterPattern'
project:
$ref: '#/definitions/wordCharacterPattern'
instance:
serviceAccount:
$ref: '#/definitions/wordCharacterPattern'
type:
type: string
Expand Down
19 changes: 10 additions & 9 deletions values/loki/loki.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,7 @@ loki:
schema_config:
configs:
- from: {{ $l | get "v11StartDate" "2023-01-01" }}
{{- if eq $st.type "gcs" }}
store: bigtable
{{- else }}
store: boltdb-shipper
{{- end }}
{{- if eq $st.type "minioLocal" }}
object_store: s3
{{- end }}
Expand All @@ -128,7 +124,6 @@ loki:
prefix: index_
period: 24h
storage_config:
{{- if ne $st.type "gcs" }}
boltdb_shipper:
{{- if eq $st.type "minioLocal" }}
shared_store: s3
Expand All @@ -139,16 +134,16 @@ loki:
{{- if eq $st.type "azure" }}
shared_store: azure
{{- end }}
{{- if eq $st.type "gcs" }}
shared_store: gcs
{{- end }}
{{- if eq $st.type "filesystem" }}
shared_store: filesystem
{{- end }}
active_index_directory: /var/loki/index
cache_location: /var/loki/cache
cache_ttl: 168h
{{- else }}
bigtable:
instance: {{ $st.gcs.instance }}
project: {{ $st.gcs.project }}
{{- if eq $st.type "gcs" }}
gcs:
bucket_name: {{ $st.gcs.bucket }}
{{- end }}
Expand Down Expand Up @@ -182,6 +177,12 @@ loki:
container_name: {{ $st.azure.containerName }}
{{- end }}

{{- if and (eq $st.type "gcs") $st.gcs.serviceAccount }}
serviceAccount:
annotations:
iam.gke.io/gcp-service-account: {{ $st.gcs.serviceAccount }}
{{- end }}

ingester:
resources: {{- $l.resources.ingester | toYaml | nindent 4 }}
podAnnotations:
Expand Down

0 comments on commit d0738e6

Please sign in to comment.