Skip to content

Commit

Permalink
fix(stable/vault-operator): empty svc account name (helm#6729)
Browse files Browse the repository at this point in the history
* fix(stable/vault-operator): empty svc account name

Documented name is `vault-operator-sa`, but in the `values.yaml` it is empty. 🙀

* chorestable/vault-operator): bump to 0.1.1

* fix: use vault-operator.serviceAccountName over hardcoded, dont pollute the global template namespace
  • Loading branch information
jaredallard authored and k8s-ci-robot committed Aug 15, 2018
1 parent 0468967 commit 4f5c449
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion stable/vault-operator/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v1
description: CoreOS vault-operator Helm chart for Kubernetes
name: vault-operator
version: 0.1.0
version: 0.1.1
appVersion: 0.1.9
home: https://github.com/coreos/vault-operator
icon: https://s3.amazonaws.com/hashicorp-marketing-web-assets/brand/Vault_VerticalLogo_FullColor.B1xPC0pSax.svg
Expand Down
4 changes: 2 additions & 2 deletions stable/vault-operator/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ Create chart name and version as used by the chart label.
{{/*
Create the name of the service account to use
*/}}
{{- define "serviceAccountName" -}}
{{- define "vault-operator.serviceAccountName" -}}
{{- if .Values.serviceAccount.create -}}
{{ default (include "vault-operator.fullname" .) .Values.serviceAccount.name }}
{{- else -}}
{{ default "default" .Values.serviceAccount.name }}
{{- end -}}
{{- end -}}
{{- end -}}
2 changes: 1 addition & 1 deletion stable/vault-operator/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ spec:
app: {{ template "vault-operator.name" . }}
release: {{ .Release.Name }}
spec:
serviceAccountName: {{ template "serviceAccountName" . }}
serviceAccountName: {{ template "vault-operator.serviceAccountName" . }}
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
Expand Down
2 changes: 1 addition & 1 deletion stable/vault-operator/templates/role-binding.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ metadata:
heritage: {{ .Release.Service }}
subjects:
- kind: ServiceAccount
name: {{ template "serviceAccountName" . }}
name: {{ template "vault-operator.serviceAccountName" . }}
namespace: {{ .Release.Namespace }}
roleRef:
apiGroup: rbac.authorization.k8s.io
Expand Down
4 changes: 2 additions & 2 deletions stable/vault-operator/templates/service-account.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ .Values.serviceAccount.name }}
name: {{ template "vault-operator.serviceAccountName" . }}
labels:
app: {{ template "vault-operator.name" . }}
chart: {{ template "vault-operator.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- end }}
{{- end }}

0 comments on commit 4f5c449

Please sign in to comment.