[patch] apply pre-install RBAC for 92FC to 920 update and fix for upgrade pipeline - #2329
Conversation
…t installed for pre-install
…ync-upgrade command
…to handle permissionMode
…allMASRBAC command
IanBoden
left a comment
There was a problem hiding this comment.
We need some unit tests for the new functions like evaluatePreInstallRBACAccess, shouldApplyRBACForInstance and handle_rbac_permission_denied.
Do we need 2 different evaluatePreInstallRBACAccess or should it be one common function? the mas variant loops through all mas instances on a cluster but the aiservice one doesn't, is that because we only support a single aiservice instance per cluster? The mas one also has code for defaulting to cluster when transitioning to 9.2.0 don't we also need that for aiservice?
For aiservice, I checked on aiservice directory only and saw install and upgrade 😅 Completely missed the update for aiservice. Thanks for pointing this out. Will make changes for considering aiservice during update. Yes I will add code for defaulting to cluster when transitioning to 9.2.0 for aiservice too. |
Description
Update:
Update flow:
Initial Setup & Catalog Selection
RBAC Evaluation Phase
For each MAS instance in the cluster:
Current = pre-release AND Target = GA AND Target >= 9.2.0 → RBAC Required
Current = GA OR Target = pre-release OR Target < 9.2.0 → Skip RBAC
For each instances needing RBAC:
Then checks if user has cluster-admin permissions If permissions exist then Sets applyPreInstallMASRBAC = True, if no permissions then displays warning with specific mas pre-install commands for each instance
Asks user to confirm RBAC was already applied by cluster administrator (and aborts if not)
And in last pipeline preparation phase - Applies Pre-Install RBAC if applyPreInstallMASRBAC set as true.
Upgrade:
AI service
Jira Issue
MASCORE-12627
MASCORE-13445
Testing
Tested on quick burn cluster
Update (for testing 9.2FC to 9.2.0 added v9-000000-test-pre-dev.yaml)
i. with --no-confirm flag


ii. without --no-confirm flag
Upgrade (for testing added the upgrade path from 9.2.x-feature to 9.2.x-dev)
i. with --no-confirm flag





ii. without --no-confirm flag
For 9.2+ upgrades, removed blocking for minimal mode
For other two modes - it will detect and apply RBAC according (if have permission to do so)
Guidance for Reviewers
Before merging this PR, this PR must be merged first: ibm-mas/python-devops#364