File tree Expand file tree Collapse file tree 6 files changed +57
-0
lines changed Expand file tree Collapse file tree 6 files changed +57
-0
lines changed Original file line number Diff line number Diff line change @@ -48,6 +48,9 @@ The following table lists the configurable parameters of the Trino chart and the
4848| ` nodeSelector ` | | ` {} ` |
4949| ` tolerations ` | | ` [] ` |
5050| ` affinity ` | | ` {} ` |
51+ | ` serviceAccount.create ` | | ` false ` |
52+ | ` serviceAccount.name ` | | ` "" ` |
53+ | ` serviceAccount.annotations ` | | ` {} ` |
5154
5255
5356
Original file line number Diff line number Diff line change @@ -61,3 +61,34 @@ Create chart name and version as used by the chart label.
6161{ {- define " trino.catalog" -} }
6262{ { template " trino.fullname" . } }-catalog
6363{ {- end -} }
64+
65+ { {/*
66+ Common labels
67+ */} }
68+ { {- define " trino.labels" -} }
69+ helm.sh/chart: { { include " trino.chart" . } }
70+ { { include " trino.selectorLabels" . } }
71+ { {- if .Chart.AppVersion } }
72+ app.kubernetes.io/version: { { .Chart.AppVersion | quote } }
73+ { {- end } }
74+ app.kubernetes.io/managed-by: { { .Release.Service } }
75+ { {- end } }
76+
77+ { {/*
78+ Selector labels
79+ */} }
80+ { {- define " trino.selectorLabels" -} }
81+ app.kubernetes.io/name: { { include " trino.name" . } }
82+ app.kubernetes.io/instance: { { .Release.Name } }
83+ { {- end } }
84+
85+ { {/*
86+ Create the name of the service account to use
87+ */} }
88+ { {- define " trino.serviceAccountName" -} }
89+ { {- if .Values.serviceAccount.create } }
90+ { {- default (include " trino.fullname" .) .Values.serviceAccount.name } }
91+ { {- else } }
92+ { {- default " default" .Values.serviceAccount.name } }
93+ { {- end } }
94+ { {- end } }
Original file line number Diff line number Diff line change 2121 release : {{ .Release.Name }}
2222 component : coordinator
2323 spec :
24+ serviceAccountName : {{ include "trino.serviceAccountName" . }}
2425 {{- with .Values.securityContext }}
2526 securityContext :
2627 runAsUser : {{ .runAsUser }}
Original file line number Diff line number Diff line change 2323 release : {{ .Release.Name }}
2424 component : worker
2525 spec :
26+ serviceAccountName : {{ include "trino.serviceAccountName" . }}
2627 volumes :
2728 - name : config-volume
2829 configMap :
Original file line number Diff line number Diff line change 1+ {{- if .Values.serviceAccount.create -}}
2+ apiVersion : v1
3+ kind : ServiceAccount
4+ metadata :
5+ name : {{ include "trino.serviceAccountName" . }}
6+ labels :
7+ {{- include "trino.labels" . | nindent 4 }}
8+ {{- with .Values.serviceAccount.annotations }}
9+ annotations :
10+ {{- toYaml . | nindent 4 }}
11+ {{- end }}
12+ {{- end }}
Original file line number Diff line number Diff line change @@ -91,3 +91,12 @@ nodeSelector: {}
9191tolerations : []
9292
9393affinity : {}
94+
95+ serviceAccount :
96+ # Specifies whether a service account should be created
97+ create : false
98+ # The name of the service account to use.
99+ # If not set and create is true, a name is generated using the fullname template
100+ name : " "
101+ # Annotations to add to the service account
102+ annotations : {}
You can’t perform that action at this time.
0 commit comments