Skip to content

fix(rbac): add list/watch/update verbs for serviceaccounts and create…#7

Merged
igoramf merged 4 commits intomainfrom
fix/serviceaccount-rbac
May 8, 2026
Merged

fix(rbac): add list/watch/update verbs for serviceaccounts and create…#7
igoramf merged 4 commits intomainfrom
fix/serviceaccount-rbac

Conversation

@igoramf
Copy link
Copy Markdown
Collaborator

@igoramf igoramf commented May 8, 2026

… builder SA in operator namespace

The controller-runtime cache requires list+watch to set up informers for ServiceAccounts. CreateOrUpdate also needs the update verb. Adds a Helm template to pre-create the builder SA in the operator namespace with the IRSA annotation when build.roleArn is set.


Summary by cubic

Fixes ServiceAccount RBAC so the controller-runtime cache can list/watch and CreateOrUpdate can update SAs. Adds a Helm template (and generator step) to pre-create the builder ServiceAccount with optional IRSA, and restores CRDs to CI controller-gen v0.18.0.

  • Bug Fixes

    • Grant list, watch, and update on core serviceaccounts to the operator manager role; update kubebuilder markers and Helm ClusterRole templates so make helm generates the correct RBAC.
    • Restore CRDs to CI controller-gen v0.18.0; minor lint cleanup after extracting the ensureServiceAccount helper.
  • New Features

    • Add chart/templates/serviceaccount-builder.yaml to optionally create the builder ServiceAccount with eks.amazonaws.com/role-arn when build.roleArn is set.
    • Add generator step in hack/helm-generator to emit the builder SA template during make helm.

Written for commit a67717b. Summary will update on new commits.

igoramf added 4 commits May 7, 2026 23:35
… builder SA in operator namespace

The controller-runtime cache requires list+watch to set up informers for
ServiceAccounts. CreateOrUpdate also needs the update verb. Adds a Helm
template to pre-create the builder SA in the operator namespace with the
IRSA annotation when build.roleArn is set.
…make helm

The helm-generator was cleaning all templates on each run, so the manually
created serviceaccount-operator-builder.yaml was deleted by CI. Added an
addBuilderServiceAccount step to the generator so it produces the conditional
Helm template. Also updated config/rbac/role.yaml with list/watch/update verbs
so make helm generates the correct ClusterRole.
@igoramf igoramf merged commit 7022b14 into main May 8, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant