Merge pull request #6555 from dokku/service-account
Add support for app-specific service accounts when deploying via k3s
This commit is contained in:
@@ -94,6 +94,7 @@ spec:
|
||||
imagePullSecrets: {{ $.Values.global.image.image_pull_secrets }}
|
||||
{{- end }}
|
||||
restartPolicy: Never
|
||||
serviceAccountName: {{ $.Values.global.app_name }}
|
||||
schedule: {{ $config.cron.schedule }}
|
||||
startingDeadlineSeconds: 60
|
||||
successfulJobsHistoryLimit: 10
|
||||
|
||||
@@ -100,3 +100,4 @@ spec:
|
||||
{{- if $.Values.global.image.image_pull_secrets }}
|
||||
imagePullSecrets: {{ $.Values.global.image.image_pull_secrets }}
|
||||
{{- end }}
|
||||
serviceAccountName: {{ $.Values.global.app_name }}
|
||||
|
||||
@@ -13,4 +13,4 @@ metadata:
|
||||
{{- with .Values.global.secrets }}
|
||||
data:
|
||||
{{- toYaml . | nindent 2 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/instance: service-account
|
||||
app.kubernetes.io/name: service-account
|
||||
app.kubernetes.io/part-of: "{{ $.Values.global.app_name }}"
|
||||
name: "{{ $.Values.global.app_name }}"
|
||||
namespace: "{{ $.Values.global.namespace }}"
|
||||
Reference in New Issue
Block a user