ROSAENG-65904 | feat: OIDC e2e sanity and operator role lifecycle - #3538
Conversation
Wire managed OIDC and operator-roles through sanity and day1 FVT. Ensure IAM OIDC provider creation runs before JSON output. List and delete hyperfleet v2 operator roles by role_prefix tag; detach instance profiles on role delete. Split hyperfleet-sanity and hyperfleet-validated ginkgo labels; use on-demand node pools in sanity.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository YAML (base), Central YAML (inherited) Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
d6830e0 to
11272e6
Compare
|
/lgtm |
Skip OCM NAME_PREFIX for hyperfleet FVT and require CLUSTER_NAME. Use a list for the worker EC2 trust Service so EnsureRole can parse it.
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: Alcamech, cdoan1 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
PR Summary
Wire hyperfleet managed OIDC and operator-roles through sanity and day1 FVT: IAM OIDC provider is created before JSON output, v2 operator roles are listed/deleted via
role_prefixtags with instance-profile cleanup, and e2e is split intohyperfleet-sanityvshyperfleet-validatedlabels with on-demand node pools in sanity.Detailed Description of the Issue
Hyperfleet v2 cluster lifecycle depends on managed OIDC configs and operator IAM roles, but e2e and handler paths still assumed OCM-style flows or incomplete AWS cleanup. Sanity tests manually created IAM resources;
rosa list operator-rolesmissed v2 role naming; delete left instance profiles attached; andcreate oidc-config --output jsonskipped IAM OIDC provider creation. Day1 FVT needed the same managed-OIDC path without OCM role prep.Related Issues and PRs
guidelines/hyperfleet-guidelines.mdType of Change
Previous Behavior
create oidc-config --output jsoncould return before creating the IAM OIDC provider.ListOperatorRolesonly matched OCM*-openshift/*-kube-systemsuffixes; v2 hyperfleet roles were invisible.DeleteOperatorRoledid not remove instance profiles (blocked deletes for worker roles).FOCUSinstead of ginkgo labels.rosa-hyperfleetprofile hadoidc_config: ""and skipped hyperfleet OIDC/operator-role prep.Behavior After This Change
hyperfleet-sanity): full CLI/SDK lifecycle — login, managed OIDC create, IAM provider assertion, operator-roles create, cluster + two on-demand node pools, teardown.hyperfleet-validated): profile-driven create withoidc_config: managed; skips OCM/user role prep when hyperfleet client is active.create oidc-config: IAM OIDC provider creation runs inPostResponseeven with--output json.list operator-roles: discovers v2 roles viaHypershiftPolicies+role_prefixtags.delete operator-roles: deletes instance profiles before role delete;--hosted-cpregistered in structure tests.LABEL_FILTERonly (hyperfleet-validateddefault,hyperfleet-sanityfor sanity).How to Test (Step-by-Step)
Preconditions
us-east-1(or region matching URL).make install(ormake install-hooksfor pre-push).make rosa.Test Steps
Unit tests on touched packages:
Sanity e2e (~60–90 min):
Day1 FVT:
Expected Results
Proof of the Fix
hyperfleet-validatedrun completed (cluster create path).oidcconfig/hyperfleet_test.go,operatorroles/hyperfleet_roles_test.go,dlt/operatorrole/hyperfleet_test.go,ListOperatorRolesv2 case inpolicies_test.go.Breaking Changes
Breaking Change Details / Migration Plan
N/A
Note:
DeleteOperatorRolenow callsDeleteInstanceProfilesForRoleon the shared OCM + hyperfleet path. Intended fix (no-op when no profiles); affects all operator-role deletes.Developer Verification Checklist
[JIRA-TICKET] | [TYPE]: <MESSAGE>.make install-hookshas been run in this clone.make testpasses (via pre-push).make lintpasses.make rosapasses (via pre-push build).Follow-up / known limits: Spot node pools removed from sanity due to capacity flakes; Spot coverage remains in dedicated HCP machine pool specs. Orphaned
hf-e2e-*AWS resources from failed runs may need manual cleanup if teardown is interrupted.