Skip to content

fix(GPTEINFRA-18860): show workshop clusters to users it is shared with - #4011

Open
aleixhub wants to merge 1 commit into
mainfrom
GPTEINFRA-18860-share-tenant-clusters
Open

aleixhub wants to merge 1 commit into
mainfrom
GPTEINFRA-18860-share-tenant-clusters

Conversation

@aleixhub

Copy link
Copy Markdown
Contributor

Problem

When a workshop is shared using Share service, the users it's shared with can see the workshop and its instances, but the Clusters tab is empty for them.

Root cause

  • For each share, service-access-manager creates a Role that grants access only to the ResourceClaims listed in the Workshop's status.resourceClaims.
  • The catalog API's ResourceClaim list endpoint removes any item the user can't get.
  • Tenant cluster ResourceClaims are created by tenant-cluster-pool-manager and are never added to Workshop.status.resourceClaims. workshop-manager deliberately skips claims with the tenant-cluster-pool label.
  • So the shared user's Role has no rule for cluster claims, and they're filtered out.

Fix

When building the Role for a shared workshop, also include ResourceClaims in the namespace that have both of these labels:

  • babylon.gpte.redhat.com/workshop-uid=<workshop uid>
  • babylon.gpte.redhat.com/tenant-cluster-pool

Matching on the workshop UID rather than its name means a recreated workshop with the same name can't pick up old claims.

  • No Helm or RBAC changes: the operator can already list resourceclaims.
  • Clusters provisioned after the share are picked up by the existing 60s reconcile timer.
  • Cluster claims get the same verbs as instance claims (delete, get, patch, update).

Testing

  • Share a workshop that has tenant clusters. The user it's shared with sees the clusters in the Clusters tab.
  • Clusters provisioned after the share appear within about 1 minute.
  • Sharing a workshop without clusters works as before.

🤖 Generated with Claude Code

…usters

Tenant cluster ResourceClaims are created by tenant-cluster-pool-manager
and are never added to Workshop status.resourceClaims, so the
ServiceAccessConfig role did not cover them and the catalog API filtered
them out for users the workshop was shared with. Look them up by
workshop-uid and tenant-cluster-pool labels and include them in the role.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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