Skip to content

fix: Make serviceAccount.name and serviceAccount.create work - #742

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

fix: Make serviceAccount.name and serviceAccount.create work#742
lfrancke wants to merge 1 commit into
mainfrom
push-ylvmumozmwpq

Conversation

@lfrancke

@lfrancke lfrancke commented Aug 8, 2026

Copy link
Copy Markdown
Member

Description

serviceAccount.name had no effect.
The Deployment, the ServiceAccount and the ClusterRoleBinding all hardcoded "-serviceaccount", and the
operator.serviceAccountName helper that we built already was never used 🥳

serviceAccount.create: false also skipped creating the ServiceAccount while the Deployment still referenced the name that no longer existed. So that's not good either.

This changes it so that the helper is used everywhere, default name is unchanged and with "create: false" giving a name is now required.

I'd call this a bug fix as well. Debatable whether this is a breaking change....

Note

I understand that this needs to be fixed in operator-templating but I want to test all my changes on hive operator first and if all those changes are accepted I'll bring them to templating!

Claude created this table for me (CRB = ClusterRoleBinding):

scenario ServiceAccount CRB subject Deployment
default rel-hive-operator-serviceaccount same same
name=my-sa my-sa my-sa my-sa
create=false, name=my-sa not created not created my-sa
create=false, no name fails at template time

Definition of Done Checklist

  • Not all of these items are applicable to all PRs, the author should update this template to only leave the boxes in that are relevant
  • Please make sure all these things are done and tick the boxes

Author

  • Changes are OpenShift compatible
  • CRD changes approved
  • CRD documentation for all fields, following the style guide.
  • Helm chart can be installed and deployed operator works
  • Integration tests passed (for non trivial changes)
  • Changes need to be "offline" compatible
  • Links to generated (nightly) docs added
  • Release note snippet added

Reviewer

  • Code contains useful comments
  • Code contains useful logging statements
  • (Integration-)Test cases added
  • Documentation added or updated. Follows the style guide.
  • Changelog updated
  • Cargo.toml only contains references to git tags (not specific commits or branches)

Acceptance

  • Feature Tracker has been updated
  • Proper release label has been added
  • Links to generated (nightly) docs added
  • Release note snippet added
  • Add type/deprecation label & add to the deprecation schedule
  • Add type/experimental label & add to the experimental features tracker

serviceAccount.name had no effect. 

This changes it so that the helper (operator.serviceAccountName) is used everywhere, default name is
unchanged and with "create: false" giving a name is now required.
@lfrancke lfrancke self-assigned this Aug 8, 2026
@lfrancke lfrancke moved this to Development: Waiting for Review in Stackable Engineering Aug 8, 2026
@lfrancke lfrancke mentioned this pull request Aug 8, 2026
20 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Development: Waiting for Review

Development

Successfully merging this pull request may close these issues.

1 participant