Skip to content

fix: Port the serviceAccount.name/create fix into the template - #634

Open
lfrancke wants to merge 1 commit into
mainfrom
push-ssyrrqqpnvkt
Open

fix: Port the serviceAccount.name/create fix into the template#634
lfrancke wants to merge 1 commit into
mainfrom
push-ssyrrqqpnvkt

Conversation

@lfrancke

@lfrancke lfrancke commented Aug 16, 2026

Copy link
Copy Markdown
Member

Ports stackabletech/hive-operator#742 into the template.

  • the Deployment and the ServiceAccount resolve their name through operator.serviceAccountName instead of hardcoding <fullname>-serviceaccount, which is what makes .Values.serviceAccount.name take effect at all
  • with create=false the helper fell back to "default", giving a pod running as the namespace default ServiceAccount without the operator ClusterRole. It now requires serviceAccount.name.

This should not be rolled out before stackabletech/listener-operator#418 and stackabletech/secret-operator#736 are merged.

Same change as hive-operator#742:

  - the Deployment and the ServiceAccount both resolve their name through
    operator.serviceAccountName instead of hardcoding <fullname>-serviceaccount,
    which is what makes .Values.serviceAccount.name take effect at all
  - with create=false the helper used to fall back to "default", giving a pod
    without the operator's ClusterRole; it now requires serviceAccount.name
{{- define "operator.serviceAccountName" -}}
{{- if .Values.serviceAccount.create }}
{{- default (include "operator.fullname" .) .Values.serviceAccount.name }}
{{- default (printf "%s-serviceaccount" (include "operator.fullname" .)) .Values.serviceAccount.name }}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technically, we don't need to include -serviceaccount in the name, because the kind already indicates what the object is, a ServiceAccount.

We also do this in various other places, like the Deployments the operator creates. It wastes valuable characters and also duplicates information.

@Techassi Techassi moved this from Development: Waiting for Review to Development: In Review in Stackable Engineering Aug 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Development: In Review

Development

Successfully merging this pull request may close these issues.

2 participants