Create role/role binding/service account required for builder/function pods (#2667)

* service account changes for fission-builder
* moved code into executor
* changed default timing to 30 min
* code refactor and add new roles for executor
* create role if serviceAccountCheck is enabled
This commit is contained in:
Shubham Bansal
2022-12-14 09:06:20 +05:30
committed by GitHub
parent 5fae765323
commit 16cbb87eab
5 changed files with 343 additions and 0 deletions
@@ -117,6 +117,28 @@ rules:
- get
- list
- watch
{{- if .Values.executor.serviceAccountCheck.enabled }}
- apiGroups:
- ""
resources:
- serviceaccounts
verbs:
- create
- get
- apiGroups:
- authorization.k8s.io
resources:
- localsubjectaccessreviews
verbs:
- create
- apiGroups:
- rbac.authorization.k8s.io
resources:
- rolebindings
- roles
verbs:
- create
{{- end }}
- apiGroups:
- apps
resources:
@@ -77,6 +77,12 @@ spec:
- name: CONTAINER_OBJECT_REAPER_INTERVAL
value: {{ .Values.executor.container.objectReaperInterval | quote }}
{{- end}}
{{- if .Values.executor.serviceAccountCheck.enabled }}
- name: SERVICEACCOUNT_CHECK_ENABLED
value: {{ .Values.executor.serviceAccountCheck.enabled | quote }}
- name: SERVICEACCOUNT_CHECK_INTERVAL
value: {{ .Values.executor.serviceAccountCheck.interval | quote }}
{{- end}}
{{- include "fission-resource-namespace.envs" . | indent 8 }}
- name: HELM_RELEASE_NAME
value: {{ .Release.Name | quote }}
+7
View File
@@ -193,6 +193,13 @@ executor:
##
## objectReaperInterval: 5
serviceAccountCheck:
## enables fission to create service account, roles and rolebinding for missing permission for builder and fetcher.
enabled: true
## indicates the time interval in minutes, after that fission will create service account, roles and rolebinding for builder and fetcher.
## interval will be applicable only if enable value is set to true.
## default timing will be 30 minutes.
interval: 30
## router is responsible for routing function calls to the appropriate function.
##
router: