Skip to content

Commit 83b437f

Browse files
committed
Add ability to disable service account token mount for gateway
The Loki gateway acts as a reverse proxy and doesn't require Kubernetes API access. This change allows users to disable service account token mounting for better security posture. Signed-off-by: Mario Asabella <[email protected]>
1 parent 6eecb00 commit 83b437f

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

charts/loki-distributed/templates/gateway/deployment-gateway.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ spec:
4141
{{- end }}
4242
spec:
4343
serviceAccountName: {{ include "loki.serviceAccountName" . }}
44+
automountServiceAccountToken: {{ .Values.gateway.serviceAccount.automountServiceAccountToken }}
4445
{{- with .Values.imagePullSecrets }}
4546
imagePullSecrets:
4647
{{- toYaml . | nindent 8 }}

charts/loki-distributed/values.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -1020,6 +1020,7 @@ gateway:
10201020
replicas: 1
10211021
# -- Enable logging of 2xx and 3xx HTTP requests
10221022
verboseLogging: true
1023+
automountServiceAccountToken: true # default to true for backward compatibility
10231024
autoscaling:
10241025
# -- Enable autoscaling for the gateway
10251026
enabled: false

0 commit comments

Comments
 (0)