-
Notifications
You must be signed in to change notification settings - Fork 355
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support adding custom service account (#246)
Fixes: issue #245 This patch: * Add option in values.yaml that enable optionaly creating custom service account, with following properties: * values.yaml has set with serviceAccount.create to false, so by default they use kubernetes default service account - this will make this change backward compatible * Once serviceAccount.create is marked to true, it use default name which is temporal.fullname, but can be customized with serviceAccount.name * Users can add extraAnnotations to add any additional annotations for service acccounts * Usually associating k8s service account with public cloud IAM role is done by adding custom annotation to serviceAccount, so this will enable users to pass such annotations to temporal serviceAccount * Created a custom serviceAccount with pre-install helm hook with low hook-weight as temporal server job is running with pre-install helm hook in some cases and serviceAccount should be created before job execution for the jobs run with custom serviceAccount
- Loading branch information
Showing
7 changed files
with
52 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{{- if .Values.serviceAccount.create -}} | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: {{ include "temporal.serviceAccountName" . }} | ||
labels: | ||
app.kubernetes.io/name: {{ include "temporal.name" . }} | ||
helm.sh/chart: {{ include "temporal.chart" . }} | ||
app.kubernetes.io/managed-by: {{ .Release.Service }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
app.kubernetes.io/version: {{ .Chart.AppVersion | replace "+" "_" }} | ||
app.kubernetes.io/part-of: {{ .Chart.Name }} | ||
annotations: | ||
helm.sh/hook: pre-install | ||
helm.sh/hook-weight: "-10" | ||
{{- with .Values.serviceAccount.extraAnnotations }} | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
{{- end -}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters