Skip to content

Commit

Permalink
Bugfix to kubetail chart
Browse files Browse the repository at this point in the history
* Added missing `serviceAccountName` to deployment
  • Loading branch information
amorey committed Feb 11, 2024
1 parent 050456a commit 797210c
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion charts/kubetail/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ keywords:
- kubetail
- logging
type: application
version: 0.1.1
version: 0.1.2
appVersion: "0.1.0"
home: https://github.com/kubetail-org/kubetail
maintainers:
Expand Down
7 changes: 7 additions & 0 deletions charts/kubetail/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,10 @@ app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}

{{/*
ServiceAccount name
*/}}
{{- define "kubetail.serviceAccountName" -}}
{{ if .Values.serviceAccount.name }}{{ .Values.serviceAccount.name }}{{ else }}{{ include "kubetail.fullname" . }}{{ end }}
{{- end }}
2 changes: 1 addition & 1 deletion charts/kubetail/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ spec:
checksum/config: {{ include (print $.Template.BasePath "/config-map.yaml") . | sha256sum }}
spec:
{{- if eq .Values.authMode "cluster" }}
serviceAccountName: {{ .Values.serviceAccount.name }}
serviceAccountName: {{ include "kubetail.serviceAccountName" . }}
{{- end }}
containers:
- name: kubetail
Expand Down
2 changes: 1 addition & 1 deletion charts/kubetail/templates/service-account.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ apiVersion: v1
kind: ServiceAccount
metadata:
{{- include "kubetail.metadataNamespace" $ | nindent 2 }}
name: {{ if .Values.serviceAccount.name }}{{ .Values.serviceAccount.name }}{{ else }}{{ include "kubetail.fullname" . }}{{ end }}
name: {{ include "kubetail.serviceAccountName" . }}
labels:
{{- include "kubetail.labels" $ | nindent 4 }}

0 comments on commit 797210c

Please sign in to comment.