[KYUUBI #3860] [K8S] Add service account name in values.yaml to config kyuubi's serviceAccountName in helm template file

### _Why are the changes needed?_

For kyuubi run in kubernetes, kyuubi need permissions to create/list/delete pods.

Kubernetes provides serviceAccountName for quick configuration of permissions(Get details in [RBAC](https://kubernetes.io/docs/reference/access-authn-authz/rbac/)).

Add `serviceAccoutName` to the values.yaml file to help users add configurations without changing the template file.

### _How was this patch tested?_
- [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible

- [ ] Add screenshots for manual tests if appropriate

- [x] [Run test](https://kyuubi.apache.org/docs/latest/develop_tools/testing.html#running-tests) locally before make a pull request

![WX20221128-114911](https://user-images.githubusercontent.com/52876270/204190111-b463239f-0427-4197-b3b4-e2a3a0bdf7ad.png)

Closes #3860 from zwangsheng/kubernetes/serviceAccount.

Closes #3860

e87bcb69 [zwangsheng] [K8S] Add service account name in values.yaml for kyuubi's serviceAccountName

Authored-by: zwangsheng <2213335496@qq.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
This commit is contained in:
zwangsheng 2022-11-28 16:08:55 +08:00 committed by Cheng Pan
parent a97b843303
commit f67e141096
No known key found for this signature in database
GPG Key ID: 8001952629BCC75D
2 changed files with 7 additions and 0 deletions

View File

@ -35,6 +35,9 @@ spec:
app: {{ template "kyuubi.name" . }}
release: {{ .Release.Name }}
spec:
{{- if .Values.serviceAccount }}
serviceAccountName: {{ .Values.serviceAccount.name }}
{{- end}}
containers:
- name: kyuubi-server
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"

View File

@ -28,6 +28,10 @@ image:
# Overrides the image tag whose default is the chart appVersion.
tag: "master-snapshot"
# ServiceAccount used for Kyuubi create/list/delete pod in kubernetes
serviceAccount:
name: default
probe:
liveness:
enabled: true