Skip to content

Commit 5049663

Browse files
[Helm] ServiceAccount for TabletServer, CoordinatorServer (#2142)
* ServiceAccount for TabletServer * ServiceAccount for CoordinatorServer * helm convention and generic comment
1 parent f26312f commit 5049663

File tree

4 files changed

+45
-1
lines changed

4 files changed

+45
-1
lines changed

helm/templates/serviceaccount.yaml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#
2+
# Licensed to the Apache Software Foundation (ASF) under one
3+
# or more contributor license agreements. See the NOTICE file
4+
# distributed with this work for additional information
5+
# regarding copyright ownership. The ASF licenses this file
6+
# to you under the Apache License, Version 2.0 (the
7+
# "License"); you may not use this file except in compliance
8+
# with the License. You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing, software
13+
# distributed under the License is distributed on an "AS IS" BASIS,
14+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
# See the License for the specific language governing permissions and
16+
# limitations under the License.
17+
#
18+
19+
{{- if .Values.serviceAccount.create }}
20+
apiVersion: v1
21+
kind: ServiceAccount
22+
metadata:
23+
name: {{ .Values.serviceAccount.name | default (include "fluss.fullname" .) }}
24+
labels:
25+
{{- include "fluss.labels" . | nindent 4 }}
26+
{{- with .Values.serviceAccount.annotations }}
27+
annotations:
28+
{{- toYaml . | nindent 4 }}
29+
{{- end }}
30+
{{- end }}

helm/templates/sts-coordinator.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ spec:
3535
{{- include "fluss.selectorLabels" . | nindent 8 }}
3636
app.kubernetes.io/component: coordinator
3737
spec:
38+
{{- if .Values.serviceAccount.create }}
39+
serviceAccountName: {{ .Values.serviceAccount.name | default (include "fluss.fullname" .) }}
40+
{{- end }}
3841
containers:
3942
- name: {{ .Chart.Name }}-coordinator
4043
image: "{{.Values.image.repository}}:{{ .Values.image.tag }}"

helm/templates/sts-tablet.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ spec:
3535
{{- include "fluss.selectorLabels" . | nindent 8 }}
3636
app.kubernetes.io/component: tablet
3737
spec:
38+
{{- if .Values.serviceAccount.create }}
39+
serviceAccountName: {{ .Values.serviceAccount.name | default (include "fluss.fullname" .) }}
40+
{{- end }}
3841
containers:
3942
- name: {{ .Chart.Name }}-tablet
4043
image: "{{.Values.image.repository}}:{{ .Values.image.tag }}"

helm/values.yaml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,4 +65,12 @@ resources: {}
6565
# memory: 128Mi
6666
# limits:
6767
# cpu: 100m
68-
# memory: 128Mi
68+
# memory: 128Mi
69+
70+
serviceAccount:
71+
create: false
72+
# If not set and create is true, a name is generated using the fullname template
73+
name: ""
74+
# Additional annotations to apply to the ServiceAccount.
75+
# These can be useful, for example, to support integrations like workload identity.
76+
annotations: {}

0 commit comments

Comments
 (0)