
* Make serviceAccount name a configuration option Follow Helm Best Practices when defining serviceAccount names https://helm.sh/docs/chart_best_practices/#using-rbac-resources * Use enabled instead of create for consistency * Add unit tests for user-defined service account name * ServiceAccount under server Co-authored-by: David Holsgrove <david@apnic.net> * Update ServiceAccount in RoleBindings to address https://github.com/hashicorp/vault-helm/pull/56#pullrequestreview-297856433 Co-authored-by: David Holsgrove <david@apnic.net> * Update tests for helm template arg --show-only Co-authored-by: David Holsgrove <david@apnic.net> * Fix server-serviceaccount tests * serviceAccount: rename enabled to create * statefulSet: add tests for serviceAccount Co-authored-by: Nick Satterly <nick@diabol.se> Co-authored-by: David Holsgrove <david@apnic.net>
18 lines
655 B
YAML
18 lines
655 B
YAML
{{ template "vault.mode" . }}
|
|
{{- if ne .mode "external" }}
|
|
{{- if and (ne .mode "") (eq (.Values.global.enabled | toString) "true") }}
|
|
{{- if (eq (.Values.server.serviceAccount.create | toString) "true" ) }}
|
|
apiVersion: v1
|
|
kind: ServiceAccount
|
|
metadata:
|
|
name: {{ template "vault.serviceAccount.name" . }}
|
|
namespace: {{ .Release.Namespace }}
|
|
labels:
|
|
helm.sh/chart: {{ include "vault.chart" . }}
|
|
app.kubernetes.io/name: {{ include "vault.name" . }}
|
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
|
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
|
{{ template "vault.serviceAccount.annotations" . }}
|
|
{{ end }}
|
|
{{ end }}
|
|
{{ end }}
|