Skip to content

Commit aafd828

Browse files
authored
Security improvement: Do not automount the service account via StatefulSet or ServiceAccount (#222)
1 parent 3606279 commit aafd828

File tree

3 files changed

+4
-0
lines changed

3 files changed

+4
-0
lines changed

charts/questdb/templates/serviceaccount.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{{- if .Values.serviceAccount.create }}
22
apiVersion: v1
33
kind: ServiceAccount
4+
automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }}
45
metadata:
56
name: {{ include "questdb.serviceAccountName" . }}
67
{{- if .Values.serviceAccount.labels }}

charts/questdb/templates/statefulset.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ spec:
3333
{{- if or .Values.serviceAccount.create .Values.serviceAccount.name }}
3434
serviceAccountName: {{ include "questdb.serviceAccountName" . }}
3535
{{- end }}
36+
automountServiceAccountToken: {{ .Values.automountServiceAccountToken }}
3637
containers:
3738
- name: {{ .Chart.Name }}
3839
securityContext:

charts/questdb/values.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ livenessProbe: {}
109109
# successThreshold: 1
110110
# timeoutSeconds: 2
111111

112+
automountServiceAccountToken: false
112113

113114
metrics:
114115
enabled: true
@@ -121,6 +122,7 @@ serviceAccount:
121122
create: false
122123
labels: {}
123124
annotations: {}
125+
automountServiceAccountToken: false
124126

125127
# if create is set to "true", you can specify the name of that service account below
126128
# if create is set to "false", you can use this to reference an existing service account for the StatefulSet pod

0 commit comments

Comments
 (0)