nats-io / k8s

NATS on Kubernetes with Helm Charts
Apache License 2.0
446 stars 302 forks source link

Nats-Kafka Service Account Support #853

Closed ChrisDizenzo1047 closed 7 months ago

ChrisDizenzo1047 commented 8 months ago

Description

The Nats-Kafka _helpers.tpl already had the service account setup, but it seemed incomplete:

{{/*
Create the name of the service account to use
*/}}
{{- define "nats-kafka.serviceAccountName" -}}
{{- if .Values.serviceAccount.create }}
{{- default (include "nats-kafka.fullname" .) .Values.serviceAccount.name }}
{{- else }}
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
{{- end }}

There was no usage of nats-kafka.serviceAccountName, so this PR just adds the usage of that. If create is true it creates a service account, if not it uses the value from serviceAccount.name.

Testing

Tested the helm chart from our internal branch and worked as intended.