Skip to content

feat: Let compute admins update and patch Instances - #366

Open
scotwells wants to merge 1 commit into
mainfrom
feat/admin-instance-patch
Open

scotwells wants to merge 1 commit into
mainfrom
feat/admin-instance-patch

Conversation

@scotwells

Copy link
Copy Markdown
Contributor

When an Instance is left holding a finalizer from a controller that no longer runs, nobody in the project can clear it without break-glass credentials. The compute admin role only reads Instances, and no role on the platform grants the write needed to edit one, so even an organization owner is blocked. This change lets a project's compute admins update and patch Instances, so an operator can remove a stuck finalizer with ordinary credentials. Creating and deleting Instances stays with the controllers that own them.

Change

Adds two permissions to the Compute Admin role:

  • compute.datumapis.com/instances.update
  • compute.datumapis.com/instances.patch

The Instance protected resource already declares both verbs, so no other IAM change is needed.

Context

Three Instances in staging still carry the retired compute.datumapis.com/infra-provider-gcp finalizer and cannot be cleaned up through IAM today.

Instances are a projection the compute operator maintains, so an admin's edit to their spec may be overwritten on the next reconcile. The intended use is metadata cleanup such as finalizers.

Related to datum-cloud/infra#5980

Test plan

  • The IAM kustomization builds with the new permissions
  • After release, an org owner can patch a finalizer off an Instance in staging
  • A project viewer still cannot patch an Instance
  • Creating or deleting an Instance is still denied for compute admins

Instances are created and owned by controllers, so the compute admin role
only granted read access to them. That left operators unable to remove a
stale finalizer from an Instance whose controller had been retired: no
role in the platform held instances.patch or instances.update, so even an
organization owner needed break-glass credentials.

Grant update and patch on Instances to compute.datumapis.com-admin. The
Instance ProtectedResource already declares both verbs. Create and delete
stay with the controllers that own the Instance lifecycle.
@scotwells
scotwells marked this pull request as ready for review September 24, 2026 19:14
@scotwells
scotwells requested a review from a team as a code owner September 24, 2026 19:14
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.

2 participants