Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion charts/loki/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: Helm chart for Grafana Loki supporting monolithic, simple scalable,
type: application
# renovate: docker=docker.io/grafana/loki
appVersion: 3.7.1
version: 11.4.10
version: 11.4.11
kubeVersion: ">=1.25.0-0"
home: https://grafana-community.github.io/helm-charts
sources:
Expand Down
2 changes: 1 addition & 1 deletion charts/loki/templates/_serviceaccount.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ $name | default (include "loki.resourceName" (dict "ctx" $ctx "component" $target)) }}
name: {{ $name | default (include "loki.serviceAccountName" (dict "ctx" $ctx "component" $component "target" $target)) }}
namespace: {{ include "loki.namespace" $ctx }}
labels:
{{- include "loki.labels" . | nindent 4 }}
Expand Down
18 changes: 18 additions & 0 deletions charts/loki/tests/backend/serviceaccount_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,24 @@ tests:
path: subjects[0].name
value: backend-custom-sa

- it: creates backend ServiceAccount with backend serviceAccount.name override
set:
backend.serviceAccount.create: true
backend.serviceAccount.name: backend-custom-sa
asserts:
- template: backend/statefulset.yaml
equal:
path: spec.template.spec.serviceAccountName
value: backend-custom-sa
- template: backend/clusterrolebinding.yaml
equal:
path: subjects[0].name
value: backend-custom-sa
- template: backend/serviceaccount.yaml
equal:
path: metadata.name
value: backend-custom-sa

- it: sets backend ServiceAccount automountServiceAccountToken when creating backend account
set:
backend.serviceAccount.create: true
Expand Down
2 changes: 1 addition & 1 deletion charts/loki/tests/single-binary/serviceaccount_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ tests:
- template: serviceaccount.yaml
equal:
path: metadata.name
value: RELEASE-NAME-loki
value: global-custom-sa

- it: uses explicit global service account name without creating serviceaccount when disabled
set:
Expand Down
Loading